<commit_before>//
//  DispatchQueue.swift
//  TwisterFoundation
//
//  Created by <NAME> on 2/12/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//
//

import Foundation
import Dispatch

extension DispatchQueue {
    
    static var currentQueueName: String? {
        #if os(Linux)
        return ""
        #else
        let name = __dispatch_queue_get_label(nil)
        let result = String(cString: name, encoding: .utf8)
        //logger.log("currentQueueName: result: \(result ?? "")")
        return result
        #endif
    }
    
    public func smartSync(execute closure: () -> Swift.Void) {
        #if os(Linux)
        self.sync {
            closure()
        }
        #else
        if self.label == DispatchQueue.currentQueueName {
            closure()
        } else {
            self.sync {
                closure()
            }
        }
        #endif
    }
}
<commit_msg>public static var currentQueueName: String? {<commit_after>//
//  DispatchQueue.swift
//  TwisterFoundation
//
//  Created by <NAME> on 2/12/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//
//

import Foundation
import Dispatch

extension DispatchQueue {
    
    public static var currentQueueName: String? {
        #if os(Linux)
        return ""
        #else
        let name = __dispatch_queue_get_label(nil)
        let result = String(cString: name, encoding: .utf8)
        //logger.log("currentQueueName: result: \(result ?? "")")
        return result
        #endif
    }
    
    public func smartSync(execute closure: () -> Swift.Void) {
        #if os(Linux)
        self.sync {
            closure()
        }
        #else
        if self.label == DispatchQueue.currentQueueName {
            closure()
        } else {
            self.sync {
                closure()
            }
        }
        #endif
    }
}

{'fraction_non_alphanumeric': 0.11436314363143632, 'fraction_numerical': 0.01084010840108401, 'mean_word_length': 1.6258890469416785, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5437189', 'n_tokens_mistral': 551, 'n_tokens_neox': 526, 'n_words': 130}