| 1 |
############################################################################### |
| 2 |
# Extra reducers for Windows system and connections objects |
| 3 |
# |
| 4 |
# author: Thomas Moreau and Olivier Grisel |
| 5 |
# |
| 6 |
# adapted from multiprocessing/reduction.py (17/02/2017) |
| 7 |
# * Add adapted reduction for LokyProcesses and socket/PipeConnection |
| 8 |
# |
| 9 |
import socket |
| 10 |
from multiprocessing import connection |
| 11 |
from multiprocessing.reduction import _reduce_socket |
| 12 |
|
| 13 |
from .reduction import register |
| 14 |
|
| 15 |
# register reduction for win32 communication objects |
| 16 |
register(socket.socket, _reduce_socket) |
| 17 |
register(connection.Connection, connection.reduce_connection) |
| 18 |
register(connection.PipeConnection, connection.reduce_pipe_connection) |