cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Clelland <iclell...@chromium.org>
Subject Re: File plugin threading on iOS
Date Wed, 11 Dec 2013 14:25:56 GMT
I'm hoping to have it all merged by the end of this week, if all of the
tests still pass.

Thanks for checking it out! :)

Ian


On Wed, Dec 11, 2013 at 8:59 AM, Michael Gauthier <mike@silverorange.com>wrote:

>
> On 2013-12-10 18:10, Ian Clelland wrote:
>
>> On Tue, Dec 10, 2013 at 4:40 PM, Michael Gauthier <mike@silverorange.com
>> >wrote:
>>
>>  I quickly updated the File plugin to do the local file uri stuff in
>>> resolveLocalFileSystemURI in the background using [self.commandDelegate
>>> runInBackground:^{}].
>>>
>>>
>> Dev or master?
>>
>>  I made the change in master. Dev looks way awesomer. When do you think
> you will release?
>
>
>
>
>>
>>> It works and allows my app interface to respond while the FS calls are
>>> resolving. Is this approach crazy or obviously broken in some way?
>>>
>>>
>> Probably not crazy -- depending on how you've implemented it :) It's
>> basically what I'm doing in my branch as well.
>>
>> Currently, I have CDVFile using that pattern, [self.commandDelegate
>> runInBackground:], to call the actual implementation method in
>> CDVLocalFilesystem or CDVAssetLibraryFilesystem. CDVFile passes the
>> implementation methods a callback function that sends the actual plugin
>> response when the operation is finished. (Keeping all of the
>> "Cordova-plugin-y" bits in CDVFile, and just having the raw file
>> operations
>> in the file system implementation classes.
>>
>> You can see an example of what I've done in the implementation of [CDVFile
>> readAsText:] and in [CDVLocalFilesystem readFileAtURL:start:end:
>> callback:]
>> in the dev branch.
>>
>> Ian
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message