Node.jsでがんばりすぎると別のプロセスに迷惑だから長いことかかる処理は sleep() みたいなのを挟みながらやりたいなー。 と思ってググった結果がこうですよ。 binding = { sleep: function(s) { var e = new Date().getTime() + (s * 1000); while (new Date().getTime() <= e) { /* do nothing, but burn a lot of CPU while doing so */ /* jshint noempty: false */ } }, だめですね。これCPU使いまくり。 まあ、CPUがいくら発熱してもいいよって思っても、制御が別のタスクに行かないのはアウトです。たとえばこれがサーバのリクエストハンドラに使われてたら、みんな一定秒数遅れてページ表示される、んじゃなく
This is the official blog of RubyMotion, a toolchain for iOS and OS X development that lets you do iPhone, iPad and Mac apps in Ruby. Follow us on Twitter to stay tuned with everything that's happening in the community! Not a RubyMotion user yet? Give it a spin today! It’s very sunny here in San Francisco, California, and we are super excited to give you a first sneak peek at the next major versi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く