タグ

2009年9月25日のブックマーク (3件)

  • Coro で Executor/CompletionService - はこべにっき ♨

    Java並行処理プログラミング ―その「基盤」と「最新API」を究める― をぱらぱらめくっていて出てきた、以下二つをCoroで実装してみた。 並行処理タスクの実行方法を抽象化した Executor タスクの生成とその消費を分離する CompletionService 実装とか例とかぺたぺた貼ってたらすごい長くなっちった。 gistにもあります > http://gist.github.com/191924 。 まとめ (長いので先に結論) ExecutorやCompletionServiceのようなパターンにそってプログラムをかくと、すっきりと並行処理プログラムを構成できて良い感じ。Coroでも簡単に実装できる。 これまでやられたことに名前を付けただけという話もあるけど、名前をつけて区別して理解しておくと、コード読むときの思考が整理されて良いとおもう。 Executor Executorと

    Coro で Executor/CompletionService - はこべにっき ♨
    antipop
    antipop 2009/09/25
  • Scalaでヒープサイズを増加させる方法 - moratorium

    Scalaでヒープサイズを増加させる方法 2009-08-28 (Fri) 10:43 Scala 最近Scalaを買って、勉強しています。 で、少しプログラムを書いていたのですが、ちょっと大規模なデータを扱うとOutOfMemoryError例外で落ちてしまいました。 java.lang.OutOfMemoryError: Java heap space これを解決する方法をメモします。scalaコマンドは実はjavaを実行するシェルスクリプトみたいです。 % file `which scala` /opt/scala-2.7.5.final/bin//scala: POSIX shell script text executable で、このスクリプトを見ると、以下のような記述が見つかります。 [ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx256M -X

  • MacRuby: The Definitive Guide

    More than 5,000 organizations count on our digital courses and more to help their teams learn the tools and technologies that drive business outcomes. We can help yours too. New AI policy for O’Reilly authors and talent O’Reilly president Laura Baldwin shares the company’s ethical approach to leveraging GenAI tools and ensuring O’Reilly experts are compensated for their work. Read it now It’s time

    MacRuby: The Definitive Guide