forked from goodboy/tractor
Add script "guards" to docs examples
This was originally bundled in #102 but the windows CI there has blocked that from landing quickly. These examples need to be fixed stat since I've had at least a couple people notice it now when first trying out the project.fix_examples_in_docs
parent
5741bd5209
commit
d8daa57a33
|
@ -146,6 +146,7 @@ the hip new film we're shooting:
|
||||||
print("CUTTTT CUUTT CUT!!! Donny!! You're supposed to say...")
|
print("CUTTTT CUUTT CUT!!! Donny!! You're supposed to say...")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
tractor.run(main)
|
tractor.run(main)
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,6 +193,8 @@ and use the ``run_in_actor()`` method:
|
||||||
|
|
||||||
print(await portal.result())
|
print(await portal.result())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
tractor.run(main)
|
tractor.run(main)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue