RejectedSoftware Forums

Sign up

Is there a specific reason why all the examples use static this() for the entry point?

As opposed to "shared static this() {}"?

It would appear to me that very bad things would happen as soon as you start using enableWorkerThreads(), which I would imagine will become the norm at some point. Even if vibe does handle multiple initialization gracefully, I'm pretty sure a lot of users would be surprised at their startup code running multiple times.

I'm worried that I'm not seeing something important here.

Vibe is pretty darn awesome by the way. I've been playing with it for a few days now and am loving what I'm seeing (mostly).

Francois

Re: Is there a specific reason why all the examples use static this() for the entry point?

Am 30.11.2012 06:47, schrieb Francois Chabot:

As opposed to "shared static this() {}"?

It would appear to me that very bad things would happen as soon as you start using
enableWorkerThreads(), which I would imagine will become the norm at some point. Even if vibe does
handle multiple initialization gracefully, I'm pretty sure a lot of users would be surprised at
their startup code running multiple times.

I'm worried that I'm not seeing something important here.

It's a historical left-over (from the first single-threaded days) that should be fixed and somehow I
forgot about it. Thanks for the pointer!

Vibe is pretty darn awesome by the way. I've been playing with it for a few days now and am loving
what I'm seeing (mostly).

Thanks! Please don't hesitate to criticize - there are definitely corners that haven't gotten the
love/time that they deserve and I'm more that happy to improve things.