11module PersistentWorkers
22
3- using Distributed : Distributed , ClusterManager, WorkerConfig, worker_from_id, set_worker_state, W_TERMINATED
3+ using DistributedNext : DistributedNext , ClusterManager, WorkerConfig, worker_from_id, set_worker_state, W_TERMINATED
44using Sockets: InetAddr, localhost
55
66export PersistentWorkerManager, start_worker_loop
77
8- struct PersistentWorkerManager{IP} <: Distributed. ClusterManager
8+ struct PersistentWorkerManager{IP} <: ClusterManager
99 addr:: InetAddr{IP}
1010end
1111
1212PersistentWorkerManager (host, port:: Integer ) = PersistentWorkerManager (InetAddr (host, port))
1313PersistentWorkerManager (port:: Integer ) = PersistentWorkerManager (localhost, port)
1414
15- function Distributed . launch (cm:: PersistentWorkerManager , :: Dict , launched:: Array , launch_ntfy:: Base.GenericCondition{Base.AlwaysLockedST} )
15+ function DistributedNext . launch (cm:: PersistentWorkerManager , :: Dict , launched:: Array , launch_ntfy:: Base.GenericCondition{Base.AlwaysLockedST} )
1616 (; host, port) = cm. addr
1717 wc = WorkerConfig ()
1818 wc. io = nothing
@@ -24,7 +24,7 @@ function Distributed.launch(cm::PersistentWorkerManager, ::Dict, launched::Array
2424 return nothing
2525end
2626
27- function Distributed . manage (:: PersistentWorkerManager , :: Int , :: WorkerConfig , :: Symbol ) end
27+ function DistributedNext . manage (:: PersistentWorkerManager , :: Int , :: WorkerConfig , :: Symbol ) end
2828
2929# don't actually kill the worker, just close the streams
3030function Base. kill (:: PersistentWorkerManager , pid:: Int , :: WorkerConfig )
@@ -35,7 +35,7 @@ function Base.kill(::PersistentWorkerManager, pid::Int, ::WorkerConfig)
3535 return nothing
3636end
3737
38- using Distributed : LPROC, init_worker, process_messages, cluster_cookie
38+ using DistributedNext : LPROC, init_worker, process_messages, cluster_cookie
3939using Sockets: IPAddr, listen, listenany, accept
4040
4141function start_worker_loop (host:: IPAddr , port:: Union{Nothing, Integer} ; cluster_cookie= cluster_cookie ())
0 commit comments