Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbad483c

Browse files
committed
Add more information.
1 parent351dc2a commitbad483c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

‎README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,19 +1908,18 @@ module Puma
19081908
# ...
19091909
thread= server.run# Let's step into this line later.
19101910

1911-
# This line will suspend the mainprocess execution.
1912-
# And the `thread`'s block (which is method `handle_servers`) will be executed in mainprocess.
1911+
# This line will suspend the mainthread execution.
1912+
# And the `thread`'s block (which is method `handle_servers`) will be executed in mainthread.
19131913
# See `Thread#join` for more information.
19141914
# I will show you a simple example for using `thread.join`.
19151915
# Please search `test_thread_join.rb` in this document.
19161916
thread.join
19171917

1918-
# The below line will never be executed because `thread` is always running
1919-
# and `thread` has joined to main process.
1918+
# The below line will never be executed because `thread` is always running and `thread` has joined.
19201919
# When `$ kill -s SIGTERM puma_process_id`, the below line will still not be executed
19211920
# because the block of `Signal.trap "SIGTERM"` in `Puma::Launcher#setup_signals` will be executed.
19221921
# If you remove the line `thread.join`, the below line will be executed,
1923-
# but the mainprocess will exit after all code executed and all the threads not joined will be killed.
1922+
# but the mainthread will exit after all code executed and all the threads not joined will be killed.
19241923
puts"anything which will never be executed..."
19251924
end
19261925
end
@@ -1992,8 +1991,6 @@ module Puma
19921991
# ...
19931992

19941993
if background# background: true (for this example)
1995-
#
1996-
puts"#{Thread.current.object_id}"
19971994

19981995
# It's important part.
19991996
# Remember puma created a thread here!

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp