Server alive thread

Starting the server without the alive thread seems to make the server unusable. In the documentation it simply says:

If true, start a Routine to send a /status message to the server every so often. The interval between the messages is set by theServer.aliveThreadPeriod = (seconds). The default period is 0.7. If false, /status will not be sent and the server’s window will not update.

What actually happens is that language doesn’t understand that the server is booted. Consider the following example:

(
Server.default.boot(true).doWhenBooted({
	Server.default.serverRunning().postln(); // prints true
});
)

Server.default.quit();

(
Server.default.boot(false).doWhenBooted({
	Server.default.serverRunning().postln(); // isn't executed but reports false
});
)

Should I file a bug report?

But… how could it confirm that the server is booted, without asking the server? And it’s the alive thread’s job to ask that question. No alive thread, no question, no confirmation.

hjh

Fair enough! Since the help file only mentions the server window update, this is probably only a documentation issue. In fact, I cannot even start a synth on the server. What would be a useful case for a server started like that?

I would look at it this way: The normal server boot process, with alive thread, prepares some infrastructure for you. It creates default groups, opens the shared memory interface, and performs some handshaking to arrange node, bus and buffer IDs for multiple users (if there are multiple users).

If you choose to boot the server without starting the alive thread, then you become responsible for preparing the infrastructure manually. For example, you said you couldn’t create a synth. By default, synths will be put into group 1. When the server process boots, it creates group 0 (as a bootstrap) but it doesn’t create group 1 – it’s the alive-thread-enabled boot process that does this. So, in your test, if you create the default group and put it into the right server variable (I forget which one because I never want to bother – there’s no need because it’s done automatically by default!), then I expect you could create the synth.

This means understanding a lot of implementation details that are unnecessary to consider in normal usage. You can but generally there’s not a good reason to (and there’s a bit of “if it ain’t broke, don’t fix it” here too – if you’re getting a good result from the normal boot process, then I’d stick to that unless I had a very compelling reason).

hjh