-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
@AGENTS.md
Create an EventManager class in context transport primitives. I want to migrate all OS-dependent code to the context transport primitives as much as possible. This task focuses on abstracting signals and epoll.
struct Event {
int fd_; // Linux
};
class EventManager {
// Add a custom event like a file descriptor for waiting for I/O competions, etc.
void AddEvent(const Event &event);
// Signal process awake
void Signal(int pid);
// Poll until event or re-awaken after
void PollFor(u32 usec);
}
This is essentially a wrapper around epoll.
On Linux, the EventManager allows for custom events to be registered.
By default, there will be an event for "re-awakening". This is equivalent to our signaling code with SIG_USR1 we had in the IpcManager. That should be moved here.
This class should automatically create an epoll file descriptor and a signal fd. This code should be removed from Worker and placed here. Worker should use this class instead. Same for the IpcManager.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels