Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 09 #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions 09_supervision/09
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1 Строка println("ok") не отработает. отменf задание job через 100 миллисекунд, а delay(500) внутри launch приостанавливает выполнение на 500 миллисекунд
2 во втором отработает, но в первом launch блоке нет. отменяется только child задание, которое соответствует первому launch блоку. Второе launch продолжает свое выполнение.
3 отработает. supervisorScope работает так же, как и coroutineScope
4 да, все coroutineScope являются дочерними и любое исключение, приведет к отмене всех остальных
5 да, supervisorScope создает область, в которой каждая корутина имеет свою собственную
6 нет, исключение в одной из корутин приведет к отменет остальных
7 да, SupervisorJob() позволяет корутинам выполняться независимо и исключение не приведет к отмене