Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kqueue on OS X



On Feb 16, 2004, at 5:21 PM, Glen Low wrote:

Dear All,

I'm thinking of using kqueue on 10.3 in a single separate thread from the main, event loop thread. Is kqueue threadsafe?

So you're talking about your thread simultaneously making calls on a different kqueue with different file descriptors? Then I'm 95% sure the answer is yes; that's safe.

I don't know what happens if one thread tries to manipulate a kqueue the other is using or if one thread does IO operations on an FD while another thread is waiting for events on a kqueue in which that same FD is active. Without looking at the implementation, my intuition says those are bad ideas...

In sys/event.h there seems to two nonstandard kqueue filters, any documentation on how to make them work: EVFILT_MACHPORT and EVFILT_FS?

No idea here.

Cheers, Glen Low

Good luck.

Scott Lamb
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >kqueue on OS X (From: Glen Low <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.