mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-27 23:59:41 +08:00
Event loops: a fiber's stack given back while its client is relayed
A child for which mapping is the last thing it does (tcppm, tlspr) sets maptail, what it does once mapping is over as its own end would: its log line, prepared before for tlspr. Relayed by the loop, the client's fiber then gives up its stack at once: left in the middle of the child's code, never to be resumed, it is started over from the start of its stack for the next client (fiberreset), or freed where it cannot be (Windows). Once mapping is over the loop ends the client as the child and its fiber would: the result, the tail, the connection released and freed. After a reload, which sockmap() is to see to, the client is given a fiber again for sockmap() to go on with the mapping, then its end. Not while a reload is pending: sockmap() sees to it on the fiber. The callbacks' state is no longer on the fiber's stack but allocated. clientparam has maptail and maptaildata: plugins are to be built again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
be1ae65c4f
commit
973fc89d58
7 files changed
+179
-44
No files matched your search
@@ -52,6 +52,7 @@ int fiberusable(void);
|
||||
int fiberinit(struct fiber *f, size_t stacksize);
|
||||
void fiberfree(struct fiber *f);
|
||||
void fiberstart(struct fiber *f, void (*func)(void *arg), void *arg);
|
||||
int fiberreset(struct fiber *f);
|
||||
int fiberresume(struct fiber *f);
|
||||
void fiberyield(void);
|
||||
struct fiber *fibercurrent(void);
|
||||
|
||||
Reference in new issue
Block a user