January 15, 2022
On Saturday, 15 January 2022 at 19:07:20 UTC, frame wrote:
> On Wednesday, 12 January 2022 at 08:50:09 UTC, Bagomot wrote:
>
>> Why? What am I doing wrong?
>
> I guess your main() exits and just ends all threads?

No, the program continues to run. And I tested it with while in main.
January 15, 2022
On 1/12/22 00:50, Bagomot wrote:

> If I change the run method of the Guard class so that it starts a new
> thread, the program just does nothing:
> ```d
> public void run() {
>      spawn((shared EventLoop eventLoop) {
>          while ((cast() eventLoop).loop()) {
>              continue;

The program does nothing probably because of that continue. (?)

>          }
>      }, cast(shared) this.eventLoop);
> }

So, the event loop is in a separate thread. What should happen when the events trigger? Do you want this thread to handle the events or should this thread send a message to the main thread (or perhaps a separate thread that responds to these events).

Ali

January 16, 2022
>

The program does nothing probably because of that continue. (?)

No, it does work inside the loop.

>

So, the event loop is in a separate thread. What should happen when the events trigger? Do you want this thread to handle the events or should this thread send a > message to the main thread (or perhaps a separate thread that responds to these > events).

I want the events to be handled on the same thread (not on the main).

January 16, 2022
On Monday, 27 December 2021 at 10:59:07 UTC, Ali Çehreli wrote:
> ...my DConf Online 2020 presentation here:
>   https://dconf.org/2020/online/#ali1
>
> Ali

Hey, that is a really great presentation!

Many more people should watch it, and learn ;-)

1 2
Next ›   Last »