Dec-31-2017, 03:47 AM
ok, i downloaded the book in PDF format, which is convenient for me. but i am still thinking about the events project. i originally was planning to do this in C and then in Pike. so now i want to do it in Python. i can see how this could be greatly advantaged by semaphores.
the big idea is that all the waiting is merged into one method, events.next() which waits until the next event, whatever that is. there will need to be a variety of event classes, methods to interface with each class, and a means to create and add on new event classes. one built-in event class will be event.timer which defines events that will happen at specific times (and dates), absolute (at 18:00:00 today if not past it, already) and relative (10 seconds from now, or at the next hour). input and output events will also be available. input events can be defined as data is available to read or the data has already been read (and is provided by an appropriate interface). signals will make up another class of events. handling events of child process state changes (stop, continue, exit) will also be included. more may be added either as built-in events or as add-on event classes (the instances events.register() themselves as an event handler).
the big idea is that all the waiting is merged into one method, events.next() which waits until the next event, whatever that is. there will need to be a variety of event classes, methods to interface with each class, and a means to create and add on new event classes. one built-in event class will be event.timer which defines events that will happen at specific times (and dates), absolute (at 18:00:00 today if not past it, already) and relative (10 seconds from now, or at the next hour). input and output events will also be available. input events can be defined as data is available to read or the data has already been read (and is provided by an appropriate interface). signals will make up another class of events. handling events of child process state changes (stop, continue, exit) will also be included. more may be added either as built-in events or as add-on event classes (the instances events.register() themselves as an event handler).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.