[Twisted-Python] knowing which reactor is running

Manlio Perillo manlio_perillo at libero.it
Mon Oct 23 17:03:47 EDT 2006


L. Daniel Burr ha scritto:
> Hi Manlio,
> 

Hi.

> [...]
>> Yes.
>> IWin32EventReactor interface means that the reactor support the win32
>> event system (addEvent, removeEvent).
>>
> 
> An IWin32Event interface would suggest support for the win32 event system,
> but adding "Reactor" to the end of that is wrong, in my opinion.
> 

You are right, I just picked up the first name that come to my mind.

> Naming conventions aside, yes, you have the right idea.  You'd check your
> reactor instance to see if it supports the IWin32Event interface, rather
> than checking the instance's class name.
> 


When I find some time I will write a ticket.

Moreover I think that a one more ticked is needed for polishing the
little mess (IMHO) with abstract.FileDescriptor, what it is used in
_win32serialport and _pollingfile.

As an example:
1. abstract.FileDescriptor for Posix file descriptors (like sockets)
2. win32handle.Win32Handle for win32 handles that can get notified by
WaitForSingleObject and friends (like input console and generic events)
3. upoll.PollableResource for "poor man" polling



Regards   Manlio Perillo




More information about the Twisted-Python mailing list