Skip to content

Implement runAsync (wait for thread)#27

Merged
ringabout merged 1 commit intoringabout:masterfrom
mildred:feat-run-async
Apr 17, 2023
Merged

Implement runAsync (wait for thread)#27
ringabout merged 1 commit intoringabout:masterfrom
mildred:feat-run-async

Conversation

@mildred
Copy link
Copy Markdown
Contributor

@mildred mildred commented Apr 12, 2023

Fixes #26

Implementation requires threading and the http server runs always in a background thread, main thread returns a future that completes when the background thread terminates.

asyncdispatch.poll(0)

if threadVars.event.isSome():
threadVars.event.get().trigger()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be an unsafeGet.

Copy link
Copy Markdown
Owner

@ringabout ringabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It would be nice to have a simple documentation or example here or in the Prologue for its usage.

@ringabout ringabout merged commit c338072 into ringabout:master Apr 17, 2023
@mildred mildred deleted the feat-run-async branch April 18, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow multiple servers running in parallel async

2 participants