# Path: ciao_contrib/logger_wrapper.py
# def initialize_module_logger(name):
#     """Create a logger for the module with an id of name.
# 
#     Returns the logger. Unlike initialize_logger, no handler
#     is set up.
# 
#     """
# 
#     return get_module_logger(name)


import time
import multiprocessing
import pickle
from queue import Empty
from ..logger_wrapper import initialize_module_logger
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

"""
An attempt at a simple task runner, supporting a pool-style
system where tasks wait for preconditions to be passed
before being run.

Changes in multiprocessing in Python 3.8 means that on macOS the
spawn method is used by default. This gives subtly-different results
(e.g. screen output is different) so we attempt to force the fork
style approach, but this (is dangerous*.

"""




"""
Very lmited testing and it feels a little clunky to use.

TODO:

  - tasks should signal their type via a string/name
    rather than the length of the tuple

"""

__all__ = ("TaskRunner", )


# Path: ciao_contrib/logger_wrapper.py
# def initialize_module_logger(name):
#     """Create a logger for the module with an id of name.
# 
#     Returns the logger. Unlike initialize_logger, no handler
#     is set up.
# 
#     """
# 
#     return get_module_logger(name)


# Path: ciao_contrib/_tools/taskrunner.py
import time
import multiprocessing
import pickle
from queue import Empty
from ..logger_wrapper import initialize_module_logger

# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

"""
An attempt at a simple task runner, supporting a pool-style
system where tasks wait for preconditions to be passed
before being run.

Changes in multiprocessing in Python 3.8 means that on macOS the
spawn method is used by default. This gives subtly-different results
(e.g. screen output is different) so we attempt to force the fork
style approach, but this (is dangerous*.

"""




"""
Very lmited testing and it feels a little clunky to use.

TODO:

  - tasks should signal their type via a string/name
    rather than the length of the tuple

"""

__all__ = ("TaskRunner", )


lgr = initialize_module_logger('taskrunner')