Dispatch Sources

2016-12-10 Thread Michael Hall
I recently asked if anyone had suggestions concerning a seeming kqueue deadlock 
in writing a OS X native java WatchService.
Someone, I think off-list, did suggest using VDKQueue[1], an updated version of 
Uli Kusterer’s UKKQueue. 
Looking at that the main difference seemed to be that is used GCD for the event 
notification part.
As a quick test I changed my code to do this…


dispatch_async(dispatch_get_main_queue(),^{
[self 
postJava:context about:FILE_MODIFIED withWatchKey:watchKey];
});

This didn’t seem to correct the problem. 

I did notice that Dispatch Sources[2] seem to be a newer feature that is even 
more GCD based. 
I looked for examples of it’s use…
googling
DISPATCH_SOURCE_TYPE_VNODE filetype:m

There do appear to be examples for directories but as near as I’ve been able to 
tell in quick scans of the source they only have an open file descriptor for 
the directory and then sometimes seem to sweep the directory to determine what 
has changed.

Is this correct? Is this the normal use for this code. You would not have open 
fd’s for every file in the directory?
Does anyone know of any full fledged file monitors implemented with this that I 
might of missed in my search?  (open source)
Would my chances be decent that using this might avoid the deadlock issues I 
was running into with kqueue? 

[1] https://github.com/bdkjones/VDKQueue 
[2] 
https://developer.apple.com/library/content/documentation/General/Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html#//apple_ref/doc/uid/TP40008091-CH103-SW22
 


Michael Hall



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Uploading binary troubles?

2016-12-10 Thread Rick Mann
Oh, I guess the magic is to first complain to the list, then try again. It 
finally worked.

It's really flaky, though.

> On Dec 10, 2016, at 02:06 , Rick Mann  wrote:
> 
> I've been having no end of problems trying to upload a new binary to Apple 
> today. Has anyone else? Either I get complaints about my binary, which I 
> addressed, or I get "This action could not be completed. Try again. 
> (-22421)." I've gotten the try-again error six times today, in the afternoon, 
> and now (about 2 am PST).
> 
> Has anyone successfully uploaded a binary in the last 24 hours?
> 
> -- 
> Rick Mann
> rm...@latencyzero.com
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/rmann%40latencyzero.com
> 
> This email sent to rm...@latencyzero.com


-- 
Rick Mann
rm...@latencyzero.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Uploading binary troubles?

2016-12-10 Thread Rick Mann
I've been having no end of problems trying to upload a new binary to Apple 
today. Has anyone else? Either I get complaints about my binary, which I 
addressed, or I get "This action could not be completed. Try again. (-22421)." 
I've gotten the try-again error six times today, in the afternoon, and now 
(about 2 am PST).

Has anyone successfully uploaded a binary in the last 24 hours?

-- 
Rick Mann
rm...@latencyzero.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com