Description
As far as I can tell, EThread::schedule_spawn is is not used and is just a crippled version of EThread::schedule_imm without the optional arguments.
It would be better to make this call provide a mechanism to schedule continuations that are called when a thread is spawned. This enable a lot of cleanup of some very ugly thread initialization logic while at the same time avoiding potential ugly race conditions. For instance NetHandler is initialized in each thread after the thread is already running but before (hopefully) any I/O events arrive. It would be much cleaner to do that in a thread spawn event. Further this would decouple some initialization logic and thread logic (as in this case) - the initalization logic would no longer need to know anything about thread start up other than EThread::schedule_spawn.
Attachments
Issue Links
- is depended upon by
-
TS-2164 Race condition between NetProcessor and api_init()
- Open
-
TS-3494 Expose the "name" (e.g. [ET_NET 0]) in the Thread class
- Open
-
TS-4260 Change event loop to always stall on waiting for I/O.
- Open
- relates to
-
TS-1263 Owner of mgmtapisocket can change if not compiling with libcap
- Open
-
TS-3950 PluginVC receives events after it's already closed.
- Open
-
TS-4735 Possible deadlock on traffic_server startup
- Closed
-
TS-946 Scheduling a continuation on all threads of a specific type
- Open