| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The queryrunner is responsible for running queries and keeping them
up to date. This is required for self-updating queries.
To get this to work properly the ResultProvider/emitter had to be fixed.
The emitter now only lives as long as the client holds a reference to
it, allowing the provider to detect when it is no longer necessary to
keep the query alive (because noone is listening).
In the process various lifetime issues have been fixed, that we're
caused by lambdas capturing smartpointers, that then extended the
lifetime of the associated objects unpredictably.
|
|
|
|
|
| |
We want to keep the command until we know it arrived in the resource,
so we can resend it otherwise.
|
|
|
|
| |
Still not quite there but we're avoiding the bulk of duplication by now.
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The error is now propagated to the top-most (user-owned) Future. When
an error occurs, no further tasks are executed. The first error handler
function in the chain is also called, if there's any.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a simplified progress reporting, since it does not report progress
of ther overcall Job chain, but only of individual tasks, which makes it
only really useful on one-task Jobs.
TODO: propagate subjob progress to the Future user gets copy of
TODO: compound progress reporting (be able to report a progress of the overall
Job chain)
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This should cover read and write for entites that have a 1:1 mapping to the
resource buffers.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Because it's really the application domain and not the akonadi domain.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
All identifiers should be latin1 and we make this explicit by using
QByteArray. QString is reserved for strings that can be UTF-8 or alike.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Ideally we wouldn't be copying at all, and somehow cast the table to a vector.
Unfortunately I haven't figured out how to do that, and this solution at least
gets us from 0.065 ms to 0.028 ms in testCreateCommand.
|
|/
|
|
| |
To measure overhead of the communication to the separate process.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Storing Future and current Job progress directly in Executors means
that we cannot re-execute finished job, or even execute the same Job
multiple times in parallel. To do so, we need to make Executors stateless
and track the state elsewhere.
This change does that by moving the execution state from Executor to Execution
class. Executors now only describe the tasks to execute, while Execution holds
the current state of execution. New Execution is created every time Job::exec()
is called.
Execution holds reference to it's result (Future) and Executor which created
the Execution. This ensures that Executor is not deleted when Job (which owns
Executors) goes out of scope while the execution is still running. At the same
time Future holds reference to relevant Execution, so that the Execution is
deleted when all copies of Future referring result from the respective Execution
are deleted.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's lifetime is limited to the end of the function, so we have to copy it before.
I switched to QByteArray because it simplifies the code and shouldn't really
cost anything, additionally the implicit sharing makes copies cheap.
This patch incurs the cost of always copying the buffer instead of writing
straight to the socket, but we probably anyways want to keep a copy around,
and if it would indeed be a performance issues (I doubt it), we could still optimize
that copy away.
|
| | |
|
| |
| |
| |
| | |
We indeed have to keep the facade alive, otherwise this starts crashing.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
The only reference to the top executor (the last in chain) is held by the
Job. If the Job goes out of scope after it's executed, the top Executor
is deleted (which in turn deletes the entire Executor chain). By having
the top Executor holding reference to itself during execution we ensure
that the Executor chain is not deleted until the job is finished, even
when the parent Job object is deleted in the meanwhile.
|