sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

SonicPi::RuntimeMethods#wait_for_parent_thread!

Synchronise on the promise. This means that we block this new
thread until we're absolutly sure it's been registered with the
parent thread as a thread local var. If the promise isn't
delivered within 10s, we assume the parent thread has been killed
so we abort running this thread.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/lib/sonicpi/runtime.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-SonicPi--RuntimeMethods-wait_for_parent_thread--for-pr


# Commit to git

git add app/server/ruby/lib/sonicpi/runtime.rbgit commit -m "better docs for SonicPi::RuntimeMethods#wait_for_parent_thread!"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-SonicPi--RuntimeMethods-wait_for_parent_thread--for-pr

hub pull-request


# Celebrate!