GitHub user achristianson opened a pull request:
https://github.com/apache/nifi-minifi-cpp/pull/40
Implemented event-driven scheduler
Implemented the event-driven scheduler. Refactored the thread-related code
into a base class as most of it is reused between the event-driven scheduler
and timer-driven. The event-driven scheduler has a similar loop to the
timer-driven, but instead of sleeping, it blocks until notified by another
thread that work is available.
Results in logs like this:
[2017-01-11 12:37:59.917] [minifi log] [info] GetFile process
/tmp/getfile/test
[2017-01-11 12:37:59.918] [minifi log] [info] PutFile using temporary
file /tmp/putfile/.test.5a709b5b-b517-4710-bd56-2f0be2b754c0
[2017-01-11 12:37:59.918] [minifi log] [info] PutFile writing file test
into directory /tmp/putfile
[2017-01-11 12:37:59.918] [minifi log] [info] PutFile committing put
file operation to /tmp/putfile/test
[2017-01-11 12:37:59.918] [minifi log] [info] PutFile commit put file
operation to /tmp/putfile/test succeeded
Note that the PutFile was triggered immediately after GetFile picked up the
file, which is what we want.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/achristianson/nifi-minifi-cpp MINIFI-182
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi-minifi-cpp/pull/40.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #40
----
commit 581b09a2c5d44a961d853c590c26a78ab8df6b9f
Author: Andrew Christianson <[email protected]>
Date: 2017-01-10T19:08:44Z
MINIFI-182 Added initial event-based scheduler implementation
commit 24d1c075f6c07f66b6876b2a3ebe34fe3687b3ae
Author: Andrew Christianson <[email protected]>
Date: 2017-01-11T12:41:19Z
MINIFI-182 initialize pointers to null to prevent segfault due to deleting
unallocated space
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---