KASyncProject
ActivePublic

Recent Activity

Jun 25 2023

KP_BETA added a comment to D10009: Improvements for Gettext entries wordwrapping.
Jun 25 2023, 8:20 PM
KP_ALPHA added a project to D10009: Improvements for Gettext entries wordwrapping: KASync.
Jun 25 2023, 7:26 PM

Dec 4 2020

cmollekopf closed T12493: serialEach broken in current master as Resolved.

Can't reproduce as of 338138c9d2007e75ebb7f5e97dc5894cb125193d.

Dec 4 2020, 7:19 PM · KASync

Jan 5 2020

cmollekopf assigned T12493: serialEach broken in current master to dvratil.
Jan 5 2020, 2:34 PM · KASync
cmollekopf triaged T12493: serialEach broken in current master as Normal priority.
Jan 5 2020, 2:34 PM · KASync

Dec 26 2019

cmollekopf added a comment to T12398: API v2.

A simple example without a value would be:

Dec 26 2019, 11:36 AM · KASync
cmollekopf added a comment to T12398: API v2.

I think we may even be able to used std::future and std::packaged_task directly, which I would prefer to another custom future/promise.

std::future does not have any state signalling, since it's all, so that might be a bit tricky. We still probably need a Qt-friendly wrapper to implement on top of std::future to provide some signal-slot interface and a FutureWatcher. std::packaged_task is an interesting idea, I will certainly look into it.

The error handler must forward/create the result matching what TASK3 expects.

You cannot create a result out of thin air. If the execution has failed, you simply do not have a result of the previous task.

Dec 26 2019, 11:26 AM · KASync
dvratil added a comment to T12398: API v2.

I think we may even be able to used std::future and std::packaged_task directly, which I would prefer to another custom future/promise.

Dec 26 2019, 11:19 AM · KASync
cmollekopf added a comment to T12398: API v2.

My idea is following:

  1. Introduce Promise and Future template classes, modeled after C++'s std::promise and std::future: The Promise is constructed first by the (a)synchronous task. It only has setter for result value (or error) and a getter to obtain a Future, which can the be returned from the task implementation back to KAsync to wait for a result/error. The Future and the Promise have a shared state (basically a shared pointer to a common private class that holds the result/error. It's possible to have multiple Futures created from the same Promise.

    The benefit is that it completely separates the lifetime of the Promise/Future from the Execution and rest of KAsync. This means that we no longer need to pass Future<T> & into every single task that should be asynchronous, cluttering the function's signature. Instead, the function indicates it is an asynchronous task by simply returning Future<T> instead of just T. Another benefit is that this Promise/Future API is more common in modern asynchronous frameworks.
Dec 26 2019, 10:26 AM · KASync

Dec 21 2019

dvratil added a comment to T12398: API v2.

My idea is following:

Dec 21 2019, 2:01 PM · KASync

Dec 20 2019

cmollekopf closed T12315: Crash with latest kasync master as Resolved.

Thanks that did the trick.

Dec 20 2019, 6:10 PM · KASync, Kube
cmollekopf triaged T12398: API v2 as Normal priority.
Dec 20 2019, 6:07 PM · KASync

Dec 19 2019

dvratil added a comment to T12315: Crash with latest kasync master.

OK, I have reverted the commit in master now. Sink tests pass again.

Dec 19 2019, 1:38 PM · KASync, Kube
cmollekopf added a comment to T12315: Crash with latest kasync master.

To be honest I think it makes most sense to revert back to default constructing T for the time being.

Dec 19 2019, 9:30 AM · KASync, Kube

Dec 18 2019

dvratil added a comment to T12315: Crash with latest kasync master.

There's no easy way how to fix this without reverting back to default-constructing T in Future<T>::Future().

Dec 18 2019, 1:30 PM · KASync, Kube
dvratil added a comment to T12315: Crash with latest kasync master.

It's not exactly the lifetime- it's a more deep-rooted issue with error handling.

Dec 18 2019, 9:58 AM · KASync, Kube

Dec 17 2019

cmollekopf added a comment to T12315: Crash with latest kasync master.

Generally, I'm wondering if I should deprecate this API and introduce a promise-future based API, where, instead of being passed a future from KAsync, the continuation would construct a Promise object internally a return a Future that KAsync would wait for....internally the continuation would own the Promise - it's closer to the common promise-future pattern and solves the lifetime issue, since the Promise is owned by the continuation, rather than by KAsync (which only holds the Future).

Dec 17 2019, 3:48 PM · KASync, Kube
cmollekopf added a comment to T12315: Crash with latest kasync master.

Hmm, I believe the bug might be in the Sink code. Here specifically, it's ResourceControl::flush():

The function registers two callbacks, both operating on the future reference. When the resource crashes (happens to me, I don't know if it's part of th etest), then sendFlushCommand fails, so future.setError is called (line 111). However, around the same time a notification is received with information about the crashed resource, invoking the lambda passed to registerHandler function, which then also calls future.setError() (line 98) - depending on which happens first, the future is finished at that point and completes the execution, which may delete the Future object, leaving the other lambda with a dangling reference....

Dec 17 2019, 3:42 PM · KASync, Kube
dvratil added a comment to T12315: Crash with latest kasync master.

Generally, I'm wondering if I should deprecate this API and introduce a promise-future based API, where, instead of being passed a future from KAsync, the continuation would construct a Promise object internally a return a Future that KAsync would wait for....internally the continuation would own the Promise - it's closer to the common promise-future pattern and solves the lifetime issue, since the Promise is owned by the continuation, rather than by KAsync (which only holds the Future).

Dec 17 2019, 2:39 PM · KASync, Kube
dvratil added a comment to T12315: Crash with latest kasync master.

I can probably solve the life-time of the future, however you are still calling setError twice on it, which should be undefined behavior - or, following what std::future does, would, well, not throw (because Qt), but might as well assert.

Dec 17 2019, 2:36 PM · KASync, Kube
dvratil added a comment to T12315: Crash with latest kasync master.

Hmm, I believe the bug might be in the Sink code. Here specifically, it's ResourceControl::flush():

Dec 17 2019, 2:34 PM · KASync, Kube

Dec 15 2019

cmollekopf added a comment to T12315: Crash with latest kasync master.

tests/notificationtest in sink will produce a similar crash.

Dec 15 2019, 4:23 PM · KASync, Kube

Dec 13 2019

cmollekopf added a comment to T12315: Crash with latest kasync master.

I have rebuilt the flatpak completely and can reproduce the crash. Also, I can reproduce the crash outside of the flatpak again, not sure what I did above.

Dec 13 2019, 1:16 PM · KASync, Kube

Dec 9 2019

cmollekopf added a comment to T12315: Crash with latest kasync master.

Ever since I have rebuilt a with -fsanitize=address I can no longer reproduce outside of the flatpak, so there's a chance that the fault is with flatpaks internal build chaching that somehow results in something that crashes (I can't think of a reasonable scenario, but who knows).
I'll try to completely rebuild the flatpak as well and see if this fixes the issue.

Dec 9 2019, 9:27 AM · KASync, Kube

Dec 6 2019

cmollekopf added a comment to T12315: Crash with latest kasync master.

Nothing very obvious from the address sanitizer so far, but I also haven't managed to run kube with it yet (only sinksh).

Dec 6 2019, 8:17 PM · KASync, Kube
cmollekopf added a comment to T12315: Crash with latest kasync master.

I'll try that. Next week is fine, no hurry.

Dec 6 2019, 12:29 PM · KASync, Kube
dvratil added a comment to T12315: Crash with latest kasync master.

Looks like some memory issue...could you try compiling with -fsanitize=address? I won't get to look into it properly before some time next week, sorry.

Dec 6 2019, 10:54 AM · KASync, Kube

Dec 4 2019

cmollekopf added a comment to T12315: Crash with latest kasync master.

FWIW; I have attempted but failed to reproduce this in a kasync testcase. I can reproduce it by starting latest kube with latest sink and latest kasync, and I can reproduce the crash in both flatpak (which I have now reverted to kasync 0.3.0), and a locally built kube.

Dec 4 2019, 9:25 AM · KASync, Kube

Dec 3 2019

cmollekopf created T12315: Crash with latest kasync master.
Dec 3 2019, 2:36 PM · KASync, Kube

May 20 2019

cmollekopf closed T8134: Build failure on windows as Resolved.

I'm building with clang on windows meanwhile, and that works fine.

May 20 2019, 9:38 AM · KASync

Mar 2 2018

cmollekopf added a parent task for T8134: Build failure on windows: T1478: Build on windows..
Mar 2 2018, 2:43 PM · KASync
cmollekopf triaged T8134: Build failure on windows as Normal priority.
Mar 2 2018, 2:38 PM · KASync

Apr 6 2017

cmollekopf triaged T3765: Kill task via future as Normal priority.
Apr 6 2017, 6:14 PM · KASync
cmollekopf added a comment to T3765: Kill task via future.

The guard facility should probably be added on the job level, otherwise subjobs can't use the facility to protect themselves.
Guards could work similarly to the context. Call .guard(QObject*/smart pointer) and be sure that no continuation will be called if the guard is gone.

Apr 6 2017, 6:14 PM · KASync

Mar 31 2017

cmollekopf added a comment to T3765: Kill task via future.

Or just do .exec(guard);
The guard object could be any qobject/smart pointer/...

Mar 31 2017, 11:56 AM · KASync

Mar 8 2017

cmollekopf closed T5511: Get rid of never used conversion function warning as Resolved.

Nice!

Mar 8 2017, 11:09 AM · KASync
dvratil moved T5511: Get rid of never used conversion function warning from Backlog to Done on the KASync board.

Fixed in master (see the commit message for details).

Mar 8 2017, 1:28 AM · KASync
dvratil added a commit to T5511: Get rid of never used conversion function warning: R665:9e6d18822962: Fix 'function converting Job<void> to itself will never be used' warning.
Mar 8 2017, 1:27 AM · KASync

Mar 3 2017

cmollekopf closed T5161: First KAsync release as Resolved.
Mar 3 2017, 12:57 PM · KASync

Mar 2 2017

cmollekopf updated the task description for T5511: Get rid of never used conversion function warning.
Mar 2 2017, 11:18 AM · KASync
cmollekopf created T5511: Get rid of never used conversion function warning.
Mar 2 2017, 11:17 AM · KASync

Mar 1 2017

cmollekopf closed T5160: Take KAsync out of frameworks namespace? as Resolved.
Mar 1 2017, 8:59 PM · KASync
cmollekopf added a parent task for T5160: Take KAsync out of frameworks namespace?: T5507: Release 0.1.
Mar 1 2017, 6:17 PM · KASync
cmollekopf added a parent task for T5161: First KAsync release: T5507: Release 0.1.
Mar 1 2017, 6:17 PM · KASync
cmollekopf added a comment to T5161: First KAsync release.

I'd like to do a first 0.1 release as soon as the frameworks removal is merged.

Mar 1 2017, 1:18 PM · KASync
cmollekopf added a revision to T5160: Take KAsync out of frameworks namespace?: D4859: Took kasync out of kf5 namespace.
Mar 1 2017, 1:17 PM · KASync
cmollekopf claimed T5160: Take KAsync out of frameworks namespace?.
Mar 1 2017, 12:42 PM · KASync

Feb 10 2017

cmollekopf closed T5272: Warning on 'visibility' attribute of "QDebug& operator<<(QDebug &dbg, const KAsync::Error &error)" as Resolved.

Thanks for the patch! (I applied it locally and will push it in a bit).

Feb 10 2017, 10:04 AM · Sink, KASync

Feb 6 2017

marcoscarpetta reopened T5272: Warning on 'visibility' attribute of "QDebug& operator<<(QDebug &dbg, const KAsync::Error &error)" as "Open".
Feb 6 2017, 8:10 AM · Sink, KASync
marcoscarpetta added a comment to T5272: Warning on 'visibility' attribute of "QDebug& operator<<(QDebug &dbg, const KAsync::Error &error)".

Ok, I thought that clang had a different syntax for attributes. I found the same error in Sink, this is a patch for it.

Feb 6 2017, 8:10 AM · Sink, KASync