{"id":372312,"date":"2024-05-21T05:09:15","date_gmt":"2024-05-21T05:09:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=372312"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T05:09:15","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=372312","title":{"rendered":"<span>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e Kotlin Coroutines \u0438\u043b\u0438 \u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u0445<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u043e\u0433\u043e \u041f\u0435\u0442\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0447\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b:<\/strong><\/p>\n<p>\u0412\u043e\u0442 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0421oroutineScope<\/p>\n<pre><code class=\"kotlin\">val coroutineScope = CoroutineScope(Job())<\/code><\/pre>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ef5\/333\/16f\/ef533316f3c47fc4ee11384e4cf91c25.png\" width=\"800\" height=\"320\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef5\/333\/16f\/ef533316f3c47fc4ee11384e4cf91c25.png\"\/><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043b launch<\/p>\n<pre><code class=\"kotlin\">fun main() {     val coroutineScope = CoroutineScope(Job())      coroutineScope.launch {         println(\"my awesome coroutine\")     }  }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c:<\/p>\n<pre><code class=\"diff\">my awesome coroutine  Process finished with exit code 0<\/code><\/pre>\n<p>\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442:<\/p>\n<pre><code class=\"diff\"> Process finished with exit code 0<\/code><\/pre>\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b23\/ce1\/976\/b23ce19764e9a8bf40b8d39506f8007f.png\" width=\"491\" height=\"311\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b23\/ce1\/976\/b23ce19764e9a8bf40b8d39506f8007f.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u041f\u0435\u0442\u044f \u043f\u043e\u0439\u043c\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430\u043c\u0438. \u041e\u043d\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u043a \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439!<\/p>\n<h2>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443: <\/h2>\n<p><strong>\u0427\u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434?<\/strong><\/p>\n<pre><code class=\"kotlin\">fun main() {     val coroutineScope = CoroutineScope(Job())      coroutineScope.launch {         delay(1000) \/\/\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u0440\u043e\u0441\u0442\u043e \u0436\u0434\u0435\u043c \u043e\u0434\u043d\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0443         println(\"\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\")     }      println(\"\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\") }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u041d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0439 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0434\u0443\u043c\u0430\u0439 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0442\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u043b:<\/p>\n<pre><code class=\"diff\">\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435  Process finished with exit code 0<\/code><\/pre>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e!<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/cac\/a48\/836\/caca488366d1809f75cb91534516beb1.jpg\" width=\"1016\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cac\/a48\/836\/caca488366d1809f75cb91534516beb1.jpg\" data-blurred=\"true\"\/><\/figure>\n<\/p>\n<p>\u0422\u0432\u043e\u044f \u043f\u0441\u0438\u0445\u0438\u043a\u0430 \u0435\u0449\u0435 \u0446\u0435\u043b\u0430 \u0438 \u043d\u0435\u0432\u0440\u0435\u0434\u0438\u043c\u0430, \u043d\u043e \u043e\u0442\u0432\u0435\u0442 <strong>\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439<\/strong> \ud83d\ude41<\/p>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f: <\/p>\n<pre><code class=\"diff\">\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435  Process finished with exit code 0<\/code><\/pre>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3c8\/07b\/ef8\/3c807bef84997fcc7c29f23c1a1bfc30.png\" width=\"640\" height=\"532\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3c8\/07b\/ef8\/3c807bef84997fcc7c29f23c1a1bfc30.png\"\/><\/figure>\n<\/p>\n<p><sub><u>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0448\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438 \u043a \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044e \u043d\u0438\u0436\u0435*<\/u><\/sub><\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0443\u0437\u043d\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c, \u0447\u0442\u043e\u00a0\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 main() \u0438 \u0437\u0435\u043b\u0435\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 launch\u00a0\u2014 <strong>\u044d\u0442\u043e \u0434 \u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f.<br \/><\/strong><sub>\u041a\u0441\u0442\u0430\u0442\u0438, <\/sub><strong><sub>\u043a\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 launch<\/sub><\/strong><sub> \u2013 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c &#171;\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430&#187;. \u0414\u0430\u043b\u0435\u0435 \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c launch \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/sub><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e7b\/d01\/98c\/e7bd0198ca3a6ae044e68409b4d925c8.png\" width=\"413\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e7b\/d01\/98c\/e7bd0198ca3a6ae044e68409b4d925c8.png\"\/><\/figure>\n<p><strong>\u0414\u0430\u0432\u0430\u0439 \u0443\u0437\u043d\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u041a\u0440\u0430\u0441\u043d\u043e\u0435<\/strong>\u00a0\u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 (\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b)<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0435\u043b\u0435\u043d\u043e\u0435<\/strong>\u00a0\u2014 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 (delay) \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 <em>\u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f<\/em> \u043e\u0442\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 main() <strong>\u0441\u043d\u0430\u0447\u0430\u043b\u0430<\/strong> <strong>\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0432\u00a0\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a <strong>\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b<\/strong> \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 <strong>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438\u00a0\u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e<\/strong><\/p>\n<p><strong>\u0427\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435:<\/strong><\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c main(), <strong>\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <strong>println(\u201c\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\u201d)<\/strong>, \u043d\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c delay() \u0432 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0435, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u0444\u0440\u0430\u0437\u043e\u0439 <em>Process finished with exit code 0<\/em><\/p>\n<h2>\u041d\u043e \u043a\u0430\u043a \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u201c\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\u201d, \u0430 \u043f\u043e\u0442\u043e\u043c \u201c\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435&#187;?<\/h2>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435: &#171;\u043f\u043e\u0434\u043e\u0436\u0434\u0438 \u043f\u043e\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f <strong>delay(1000)<\/strong>, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0439 <strong>&#171;\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435&#187;<\/p>\n<p><\/strong>\u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>join()<\/strong><\/p>\n<p> <strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0435:<\/strong><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/44d\/d44\/baa\/44dd44baad4ed2cd76e9b09f49c86599.png\" alt=\"\" title=\"\" width=\"409\" height=\"225\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44d\/d44\/baa\/44dd44baad4ed2cd76e9b09f49c86599.png\"\/><\/figure>\n<p><strong>join()<\/strong> <strong>\u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442<\/strong> \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u043a\u0430 \u0437\u0435\u043b\u0435\u043d\u043e\u0435 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 delay()<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd9\/a31\/d1f\/bd9a31d1f6ab4a3dd8a774fff18b20df.png\" width=\"725\" height=\"306\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd9\/a31\/d1f\/bd9a31d1f6ab4a3dd8a774fff18b20df.png\"\/><\/figure>\n<p>\u041d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <strong>\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 main()<\/strong> \u0441\u043b\u043e\u0432\u043e <strong>suspend<\/p>\n<p>suspend<\/strong> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c<\/strong> \u0441\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<br \/><sub>\u041e\u0431\u0440\u0430\u0449\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <\/sub><strong><sub>main(), <\/sub><\/strong><sub>\u0430 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f<\/sub><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed4\/a55\/8ee\/ed4a558ee53778eb10171308353113bf.png\" alt=\"\" title=\"\" width=\"400\" height=\"219\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ed4\/a55\/8ee\/ed4a558ee53778eb10171308353113bf.png\"\/><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0441\u0435\u0439\u0447\u0430\u0441 <strong>\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9f6\/980\/734\/9f69807342dd8a5173723be7d5ddd361.png\" width=\"817\" height=\"218\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9f6\/980\/734\/9f69807342dd8a5173723be7d5ddd361.png\"\/><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0432 <strong>join()<\/strong>, \u043c\u044b \u0438\u043c\u0435\u0435\u043c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad1\/0b5\/a28\/ad10b5a28e1a28c44de96f5009534f73.png\" alt=\"\" title=\"\" width=\"516\" height=\"243\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad1\/0b5\/a28\/ad10b5a28e1a28c44de96f5009534f73.png\"\/><\/figure>\n<h2>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0437\u0430\u0441\u044b\u043f\u043a\u0443! <\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>join()<\/p>\n<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c:<br \/><\/strong><em>\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<br \/>\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/em><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/941\/dd1\/601\/941dd16017cd8ba7b6ad362c07f363e4.png\" alt=\"\" title=\"\" width=\"400\" height=\"219\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/941\/dd1\/601\/941dd16017cd8ba7b6ad362c07f363e4.png\"\/><\/figure>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u041d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0439 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0434\u0443\u043c\u0430\u0439 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>\u041d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 delay() \u0432 \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c <strong>suspend main()<\/strong> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e delay() \u0438 \u0434\u043e\u0436\u0434\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/div>\n<\/details>\n<h2>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c:<\/h2>\n<ol>\n<li>\n<p><strong>suspend \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong> \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b <strong>\u0432\u043d\u0443\u0442\u0440\u0438<\/strong> \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 suspend \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p><strong>join()<\/strong> \u2014 \u044d\u0442\u043e suspend \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0430 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0443\u044e suspend \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e main)<\/p>\n<\/li>\n<li>\n<p>suspend \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b <strong>\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u043a\u043e\u043c<\/strong><\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/484\/98a\/f24\/48498af2417c41527a46ba01705bc234.png\" width=\"729\" height=\"231\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/484\/98a\/f24\/48498af2417c41527a46ba01705bc234.png\"\/><\/figure>\n<p>4. \u041a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f <strong>\u043d\u0435 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e<\/strong>, \u043d\u0430 \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f<\/p>\n<h2>\u0415\u0449\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u043a\u0438:<\/h2>\n<p>\u041a\u0430\u043a \u0434\u0443\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<br \/><sub>\u041e\u0442\u0432\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044c \u0432 IDEA \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0448\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \ud83d\ude42<\/sub><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/38a\/b04\/58f\/38ab0458f572bdbcf1604f9c4cdfd389.png\" alt=\"\u0417\u0430\u0434\u0430\u0447\u0430 1\" title=\"\u0417\u0430\u0434\u0430\u0447\u0430 1\" width=\"412\" height=\"201\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/38a\/b04\/58f\/38ab0458f572bdbcf1604f9c4cdfd389.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0434\u0430\u0447\u0430 1<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d0a\/6c4\/cb7\/d0a6c4cb75898b77eb9a1d2ed9f59a62.png\" alt=\"\u0417\u0430\u0434\u0430\u0447\u0430 2\" title=\"\u0417\u0430\u0434\u0430\u0447\u0430 2\" width=\"412\" height=\"288\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d0a\/6c4\/cb7\/d0a6c4cb75898b77eb9a1d2ed9f59a62.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0434\u0430\u0447\u0430 2<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fca\/277\/20b\/fca27720b10cf68c7a8dbed246a59563.png\" alt=\"\u0417\u0430\u0434\u0430\u0447\u0430 3\" title=\"\u0417\u0430\u0434\u0430\u0447\u0430 3\" width=\"409\" height=\"332\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fca\/277\/20b\/fca27720b10cf68c7a8dbed246a59563.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0434\u0430\u0447\u0430 3<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/804241\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0440\u0443\u0431\u0440\u0438\u043a\u0430?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">74.55% <\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0430, \u0443\u0437\u043d\u0430\u044e \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435<\/span><span class=\"tm-article-poll__answer-votes\">41<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 74.55%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">25.45% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435 \u0437\u043d\u0430\u044e, \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">14<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 25.45%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 55 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 3 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/804241\/\"> https:\/\/habr.com\/ru\/articles\/804241\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u043e\u0433\u043e \u041f\u0435\u0442\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0447\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b:<\/strong><\/p>\n<p>\u0412\u043e\u0442 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0421oroutineScope<\/p>\n<pre><code class=\"kotlin\">val coroutineScope = CoroutineScope(Job())<\/code><\/pre>\n<figure class=\"float full-width\"><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043b launch<\/p>\n<pre><code class=\"kotlin\">fun main() {     val coroutineScope = CoroutineScope(Job())      coroutineScope.launch {         println(\"my awesome coroutine\")     }  }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c:<\/p>\n<pre><code class=\"diff\">my awesome coroutine  Process finished with exit code 0<\/code><\/pre>\n<p>\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442:<\/p>\n<pre><code class=\"diff\"> Process finished with exit code 0<\/code><\/pre>\n<figure class=\"float\"><\/figure>\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u041f\u0435\u0442\u044f \u043f\u043e\u0439\u043c\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430\u043c\u0438. \u041e\u043d\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u043a \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439!<\/p>\n<h2>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443: <\/h2>\n<p><strong>\u0427\u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434?<\/strong><\/p>\n<pre><code class=\"kotlin\">fun main() {     val coroutineScope = CoroutineScope(Job())      coroutineScope.launch {         delay(1000) \/\/\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u0440\u043e\u0441\u0442\u043e \u0436\u0434\u0435\u043c \u043e\u0434\u043d\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0443         println(\"\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\")     }      println(\"\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\") }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u041d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0439 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0434\u0443\u043c\u0430\u0439 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0442\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u043b:<\/p>\n<pre><code class=\"diff\">\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435  Process finished with exit code 0<\/code><\/pre>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e!<\/p>\n<figure class=\"float full-width\"><\/figure>\n<\/p>\n<p>\u0422\u0432\u043e\u044f \u043f\u0441\u0438\u0445\u0438\u043a\u0430 \u0435\u0449\u0435 \u0446\u0435\u043b\u0430 \u0438 \u043d\u0435\u0432\u0440\u0435\u0434\u0438\u043c\u0430, \u043d\u043e \u043e\u0442\u0432\u0435\u0442 <strong>\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439<\/strong> \ud83d\ude41<\/p>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f: <\/p>\n<pre><code class=\"diff\">\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435  Process finished with exit code 0<\/code><\/pre>\n<figure class=\"float full-width\"><\/figure>\n<\/p>\n<p><sub><u>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0448\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438 \u043a \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044e \u043d\u0438\u0436\u0435*<\/u><\/sub><\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0443\u0437\u043d\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c, \u0447\u0442\u043e\u00a0\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 main() \u0438 \u0437\u0435\u043b\u0435\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 launch\u00a0\u2014 <strong>\u044d\u0442\u043e \u0434 \u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f.<br \/><\/strong><sub>\u041a\u0441\u0442\u0430\u0442\u0438, <\/sub><strong><sub>\u043a\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 launch<\/sub><\/strong><sub> \u2013 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c &#171;\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430&#187;. \u0414\u0430\u043b\u0435\u0435 \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c launch \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/sub><\/p>\n<figure class=\"\"><\/figure>\n<p><strong>\u0414\u0430\u0432\u0430\u0439 \u0443\u0437\u043d\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u041a\u0440\u0430\u0441\u043d\u043e\u0435<\/strong>\u00a0\u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 (\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b)<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0435\u043b\u0435\u043d\u043e\u0435<\/strong>\u00a0\u2014 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 (delay) \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 <em>\u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f<\/em> \u043e\u0442\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 main() <strong>\u0441\u043d\u0430\u0447\u0430\u043b\u0430<\/strong> <strong>\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0432\u00a0\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a <strong>\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b<\/strong> \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 <strong>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438\u00a0\u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e<\/strong><\/p>\n<p><strong>\u0427\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435:<\/strong><\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c main(), <strong>\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <strong>println(\u201c\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\u201d)<\/strong>, \u043d\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c delay() \u0432 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0435, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u0444\u0440\u0430\u0437\u043e\u0439 <em>Process finished with exit code 0<\/em><\/p>\n<h2>\u041d\u043e \u043a\u0430\u043a \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u201c\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\u201d, \u0430 \u043f\u043e\u0442\u043e\u043c \u201c\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435&#187;?<\/h2>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435: &#171;\u043f\u043e\u0434\u043e\u0436\u0434\u0438 \u043f\u043e\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f <strong>delay(1000)<\/strong>, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0439 <strong>&#171;\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435&#187;<\/p>\n<p><\/strong>\u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>join()<\/strong><\/p>\n<p> <strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0435:<\/strong><\/p>\n<figure class=\"\"><\/figure>\n<p><strong>join()<\/strong> <strong>\u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442<\/strong> \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u043a\u0430 \u0437\u0435\u043b\u0435\u043d\u043e\u0435 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 delay()<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <strong>\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 main()<\/strong> \u0441\u043b\u043e\u0432\u043e <strong>suspend<\/p>\n<p>suspend<\/strong> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c<\/strong> \u0441\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<br \/><sub>\u041e\u0431\u0440\u0430\u0449\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <\/sub><strong><sub>main(), <\/sub><\/strong><sub>\u0430 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f<\/sub><\/p>\n<figure class=\"\"><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0441\u0435\u0439\u0447\u0430\u0441 <strong>\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0432 <strong>join()<\/strong>, \u043c\u044b \u0438\u043c\u0435\u0435\u043c:<\/p>\n<figure class=\"\"><\/figure>\n<h2>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430 \u0437\u0430\u0441\u044b\u043f\u043a\u0443! <\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>join()<\/p>\n<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c:<br \/><\/strong><em>\u0417\u0435\u043b\u0435\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<br \/>\u041a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/em><\/p>\n<figure class=\"\"><\/figure>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u041d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0439 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0434\u0443\u043c\u0430\u0439 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>\u041d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 delay() \u0432 \u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c <strong>suspend main()<\/strong> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e delay() \u0438 \u0434\u043e\u0436\u0434\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/div>\n<\/details>\n<h2>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c:<\/h2>\n<ol>\n<li>\n<p><strong>suspend \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong> \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b <strong>\u0432\u043d\u0443\u0442\u0440\u0438<\/strong> \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 suspend \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p><strong>join()<\/strong> \u2014 \u044d\u0442\u043e suspend \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0430 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0443\u044e suspend \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e main)<\/p>\n<\/li>\n<li>\n<p>suspend \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b <strong>\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u043a\u043e\u043c<\/strong><\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<p>4. \u041a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f <strong>\u043d\u0435 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e<\/strong>, \u043d\u0430 \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f<\/p>\n<h2>\u0415\u0449\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u043a\u0438:<\/h2>\n<p>\u041a\u0430\u043a \u0434\u0443\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<br \/><sub>\u041e\u0442\u0432\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044c \u0432 IDEA \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0448\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \ud83d\ude42<\/sub><\/p>\n<figure class=\"\">\n<div><figcaption>\u0417\u0430\u0434\u0430\u0447\u0430 1<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>\u0417\u0430\u0434\u0430\u0447\u0430 2<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>\u0417\u0430\u0434\u0430\u0447\u0430 3<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/804241\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0440\u0443\u0431\u0440\u0438\u043a\u0430?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">74.55% <\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0430, \u0443\u0437\u043d\u0430\u044e \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435<\/span><span class=\"tm-article-poll__answer-votes\">41<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 74.55%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">25.45% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435 \u0437\u043d\u0430\u044e, \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">14<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 25.45%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 55 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 3 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/804241\/\"> https:\/\/habr.com\/ru\/articles\/804241\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-372312","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=372312"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372312\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}