More than one simultaneous operation on one account

Performing more than one simultaneous operation on one account will at
this moment let the second thread that does this wait for the first one
to finish.

This will of course make the ui hang until the operation is completed.

The _async version of the method will not hang the ui, but will also
have to wait for the first one to finish.

The idea is to find all possible occurrences and put cancellation
markers above and below the camel-lite command itself. This will cancel
the previous command, and invoke the new command.

Some existing implementations already do this. For example the refresh
method of TnyFolder in libtinymail-camel does this.

Any other ideas or suggestions? I consider a full-scale queue mechanism,
like OAsyncWorker, to be a little bit overkill for tinymail. Also note
that a queue system would force the developer to always develop
asynchronously (the message will not be available when the function
returns, it will be available in a callback).

My personal preference goes out to continuing with the _async methods
for those that can take a certain amount of time, and implementing
correct cancellations everywhere.

Taking the assumption that on a mobile device, the user wants to do only
one thing at the same time (pragmatism).

With the sending of messages as the soul exception on that rule.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]