diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-05-16 14:12:29 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-05-16 21:08:55 -0700 |
| commit | eab6a4d2d96d11d3926e927c135362fc166895f0 (patch) | |
| tree | b4f8097c339856a1bd12db6d1975fe1b7b951b4b /src/core/aio.c | |
| parent | ec84c5a8406bb203d5f8830e280f93cf1f63cd6a (diff) | |
| download | nng-eab6a4d2d96d11d3926e927c135362fc166895f0.tar.gz nng-eab6a4d2d96d11d3926e927c135362fc166895f0.tar.bz2 nng-eab6a4d2d96d11d3926e927c135362fc166895f0.zip | |
fixes #445 crash in taskq_thread
This changes the array of flags, which was confusing, brittle, and
racy, into a much simpler reference (busy) count on the task structures.
This allows us to support certain kinds of "reentrant" dispatching,
where either a synchronous or asynchronous task can reschedule / dispatch
itself. The new code also helps reduce certain lock pressure, as a bonus.
Diffstat (limited to 'src/core/aio.c')
| -rw-r--r-- | src/core/aio.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/core/aio.c b/src/core/aio.c index 6276589b..99da356a 100644 --- a/src/core/aio.c +++ b/src/core/aio.c @@ -315,7 +315,6 @@ nni_aio_begin(nni_aio *aio) nni_mtx_lock(&nni_aio_lk); // We should not reschedule anything at this point. if (aio->a_stop) { - nni_task_unprep(aio->a_task); aio->a_result = NNG_ECANCELED; nni_mtx_unlock(&nni_aio_lk); return (NNG_ECANCELED); |
