Workaround for morbo (MSWin + threads related) #384

wants to merge 1 commit into


None yet

3 participants



I was investigating why morbo's autoreloading feature is crashing on MS Windows.

It turns out that there are 2 pieces used by Mojo that do not play well with threads (you probably know that fork() which is used by morbo is emulated via threads on MS Windows).

1/ Mojo::Reactor::EV seems to have troubles when used with perl's threads

2/ IO::Socket::SSL is basically thread safe providing that it is loaded in the main thread - I have created an RT for this issue

The patch in this pull request tries to deal with those 2 issues.

I know that it is a hack and that proper fix should be made in other modules outside Mojo. On the other hand providing that morbo is "only" development server I hope you will not reject it.



-1 from me, historically all Windows specific behavior has always turned out to be a total nightmare to maintain for us. This should really be fixed in EV and IO::Socket::SSL. Windows users who have those modules installed can already use the MOJO_NO_TLS=1 and MOJO_REACTOR=Mojo::Reactor::Poll environment variables as a workaround.

@kraih kraih closed this Sep 17, 2012

For future reference, we've discussed this a bit further on IRC, and it turns out that only EV is currently not thread-safe. So Windows users who have EV installed and want to use Morbo, only need to set the MOJO_REACTOR=Mojo::Reactor::Poll environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment