{'fraction_non_alphanumeric': 0.02177700348432056, 'fraction_numerical': 0.0008710801393728223, 'mean_word_length': 5.641618497109826, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, '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}}
Function flow: making synchronization easier in task parallelism

Expressing synchronization in task parallelism remains a significant challenge because of the complicated relationships between tasks. In this paper, we propose a novel parallel programming model, namely function flow, where synchronization is easier to express. We release the burden of synchronizing by the virtue of parallel functions and functional wait. In function flow, parallel functions are defined to represent parallel tasks. Functional wait is designed to coordinate relationships of parallel functions at task-level. The main aspects of functional waits are boolean-expressions which are coupled with parallel functions' invocations. The functional wait mechanisms, based on parallel functions, provide powerful semantic supports and compiling time checking on relationships of parallel tasks. Our preliminary result of function flow shows that a wide range of realistic parallel programs can be easily expressed with performance coming close to well-tuned multi-threaded programs using barriers/sync. The overhead of task-level coordination is very low, not exceed 8%.