Fuoco is a simple multi-threading programming framework for Yotsuba 3. This framework is to make multi-threading programming in Python even easier. The framework will block the caller thread until all data is processed.
At the current state of the development, there are known limitations:
Simple multi-threading framework for small tasks.
Run multiple workers simulteneously (in multiple threads).
The parameter worker is a reference to a function that will be called by each thread.
The parameter input is the input list that will be feeded to the queue.
The parameter common_args is the common arguements for the worker.
The parameter max_thread is the maximum number of threads used in one run. (Optional, default: 4)
Terminating Signal only used by MultiThreadingFramework
Exception for unsupported common arguments
Exception for unsupported input list
This is the sample worker function/method.
Warning
Any worker function used with Fuoco cannot return value that the moment. See Lesson 1: Multi-threading programming on the work-around solution.