Skip to content

Add support to stop or pause Entity Threads from the C++ script API #82

@ImmutableOctet

Description

@ImmutableOctet

We should be able to write something like:

co_await stop();

to indicate that the current thread should be terminated. Ideally, this would work for references to other threads as well, e.g.

co_await some_other_thread.stop();

This could also be extended to pause:

if (auto other_thread = get_thread("other_thread"_hs))
{
	other_thread.pause
	(
		[]()
		{
			return (some_condition_to_be_met);
		}
	);
}

although some member-functions, like until, may not make sense for this. See: #78

Related: #81

Metadata

Metadata

Labels

C++ Script APIFeatureNew feature or requestIdeaIdeas, concepts, etc. (for features without a clear scope yet)module: engineFor features that involve the `engine` module. (optional)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions