On 09/08/2011 02:55 AM, Steven Simpson wrote:
> On 07/09/11 17:08, Ben Greear wrote:
>> On 09/07/2011 03:11 AM, Steven Simpson wrote:
>>> So, I believe the code removes the identified
>>> event from the array, and re-calls WaitFor* to pick out the next one.
>>> Re-calls always use a zero timeout, since an event has already fired.
>>
>> That seems like a neat hack, but it's hard to believe the windows API
>> is so inefficient as to require all of those system calls!
>
> Yeah, though it might be as few as:
>
>   * one call (with non-zero timeout) that identifies one event,
>   * the second one (with zero timeout) that reports no more events.
>
> ...regardless of the number of handles submitted.
>
>> It's also possible to use select in windows, but it only works on
>> sockets I think...
>
> That was my understanding too, hence I went looking into WaitFor*.
>
>> so not sure I could add console (stdin?) to make
>> xorpsh work properly, so I haven't tried to enable that yet...
>
> It ought to be possible to get the HANDLE for stdin. This looks promising:
>
> <http://msdn.microsoft.com/en-us/library/ms685035%28v=VS.85%29.aspx>

Every time I look at the event loop and the auto-generated templated callback 
logic in general
I want to re-write everything, so I think I'll stay clear of it for now.

Looks like OSPF is a bigger issue anyway...it's taking 4+ seconds to process
a single packet (on windows, connecting to a large OSPF network).

So, will be digging into that if I can convince a customer to pay for it :)

Thanks,
Ben

-- 
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to