Skip to content

Conversation

@Gerold103
Copy link
Owner

No description provided.

Previously if a task was in the front queue, the scheduler's
destruction would fail. Also it would fail if a currently
executing task would submit a new one during scheduler
destruction.

It was quite unhandy really. Lets make the scheduler destructor
wait until the scheduler gets empty.
It is quite handy when one task needs to spawn another one in the
same IOCore. Similar to TaskScheduler::This().

Especially for TCPServer which usually would spawn new
TCPSocket/SSLSocket on each accept, inside the same IOCore.
Some installation commands were outdated, like missing certain
files or even having typos in the paths.

Lets fix them before next commits start using the installation for
examples and testing.

Part of #21
@Gerold103 Gerold103 self-assigned this Jan 21, 2025
@Gerold103 Gerold103 force-pushed the examples branch 26 times, most recently from 45a86c5 to 3a5ec01 Compare January 22, 2025 22:20
@Gerold103 Gerold103 force-pushed the examples branch 19 times, most recently from f268e66 to 488f7ed Compare January 23, 2025 00:16
There was a problem that if a coroutine operation inherited
mg::box::CoroOp and had its own members filled in its constructor,
then those members would be nullified despite there was no any
explicit change in the code to those members.

Strangely, it was only happening in GitHub CI macos-latest, and
only in one job (the other job in the same workflow was passing ok
even more tricky tests).

Eventually, debugging with prints right in CI has revealed that
apparently the compiler in `co_await SomeOperation()` copies this
operation. And if the operation has its copy/move constructors
deleted, then the members are not copied. In most cases simply
nullified.

That looks like a compiler bug, because the copying was explicitly
forbidden, and yet it happened. It was confirmed via prints -
operation's address (`this`) was one in constructor and another in
await_suspend().

Anyway, the fix seems to be just enabling the constructors.
Unfortunately, it is not really testable. All the coro tests
passed in macos CI and failed only in the future patch introducing
examples testing.
'build' job name is not right when it is actually about tests.
The folder shows some usage examples of Serverbox. All of them use
only the public Serverbox API.

Serverbox for this is properly built and installed the same way as
users would do.

Closes #21
@Gerold103 Gerold103 force-pushed the examples branch 4 times, most recently from 2fd328e to 974df54 Compare January 23, 2025 19:47
Lets make sure they compile and run on all supported platforms
the same way as users would use Serverbox. With proper
installation steps and all that.

Closes #20
@Gerold103 Gerold103 merged commit 69206c4 into master Jan 24, 2025
16 checks passed
@Gerold103 Gerold103 deleted the examples branch January 24, 2025 11:35
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.

2 participants