{"id":820,"date":"2009-07-26T15:24:53","date_gmt":"2009-07-26T06:24:53","guid":{"rendered":"http:\/\/ecpplus.net\/weblog\/?p=820"},"modified":"2020-06-26T01:56:22","modified_gmt":"2020-06-25T16:56:22","slug":"windows_ruby_threa","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/windows_ruby_threa\/","title":{"rendered":"Windows\u306eRuby\u3067Thread\u5185\u3067\u30d7\u30ed\u30bb\u30b9\u4f5c\u6210\u3059\u308b\u3068\u6b62\u307e\u3063\u3061\u3083\u3046"},"content":{"rendered":"<p>Windows \u306e Ruby \u3067\u3001Thread \u5185\u3067\u65b0\u898f\u30d7\u30ed\u30bb\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u3088\u3046\u3068\u3059\u308b\u3068\u3001Thread \u5185\u3067\u5168\u4f53\u306e\u52d5\u4f5c\u3092\u6b62\u3081\u3066\u3057\u307e\u3046\u3089\u3057\u3044\u3002\u305f\u3068\u3048\u3070\u3001<\/p>\n<pre lang=\"ruby\">Thread.new do \n  `something.exe`\nend<\/pre>\n<p>\u3068\u3084\u3063\u3066\u307f\u308b\u3068\u3001<code>something.exe<\/code> \u306e\u51e6\u7406\u304c\u7d42\u308f\u308b\u306e\u3092\u5f85\u3063\u3066\u3044\u308b\u3088\u3046\u3060\u3002<\/p>\n<p><a href=\"http:\/\/d.hatena.ne.jp\/yotaropg\/20070523\/1179932947\">Windows+Ruby\u3067\u5916\u90e8\u30d7\u30ed\u30bb\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u308b\u6642\u306e\u6ce8\u610f<\/a> \u306b\u307e\u3055\u306b\u305d\u306e\u60c5\u5831\u304c\u8f09\u3063\u3066\u3044\u305f\u3002Windows \u306f\u3001Windows::Process \u7b49\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<pre lang=\"ruby\">require 'rubygems'\nrequire 'win32\/process'\nrequire 'windows\/synchronize'\nrequire 'windows\/process'\nrequire 'windows\/handle'\n\ninclude Windows::Synchronize\ninclude Windows::Process\ninclude Windows::Handle\n\nt = Thread.new do \n  Process.create('app_name' => 'something.exe')\nend\nputs \"hello!\"\nt.join<\/pre>\n<p>\u306e\u3088\u3046\u306b\u3057\u305f\u3089\u3001\u30d7\u30ed\u30bb\u30b9\u751f\u6210\u3057\u3066\u3082\u305d\u3053\u3067\u6b62\u307e\u308b\u3053\u3068\u306f\u7121\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows \u306e Ruby \u3067\u3001Thread \u5185\u3067\u65b0\u898f\u30d7\u30ed\u30bb\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u3088\u3046\u3068\u3059\u308b\u3068\u3001Thread \u5185\u3067\u5168\u4f53\u306e\u52d5\u4f5c\u3092\u6b62\u3081\u3066\u3057\u307e\u3046\u3089\u3057\u3044\u3002\u305f\u3068\u3048\u3070\u3001 Thread.new do `something.exe` end \u3068 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2872,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[8],"class_list":["post-820","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-ruby"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=820"}],"version-history":[{"count":1,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/820\/revisions"}],"predecessor-version":[{"id":2875,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/820\/revisions\/2875"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media\/2872"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}