Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
[B! c][worker] youpyのブックマーク
[go: Go Back, main page]

タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

cとworkerに関するyoupyのブックマーク (1)

  • 橋本商会 » Cでgearman workerを書いてRubyのclientから呼び出す

    gearmandをソースからインストールして、Cライブラリのlibgearmanが使えるようになった。 これでC言語でworkerを作ってRubyのclientから呼び出せる。環境はUbuntu9.04とgearmand0.11 ■Cでworkerを書く str_reverseというアビリティを持つworkerを作る。 ほぼAPIドキュメントのままだが、jobの引数を受け取るのと、値を返せるようにがんばった。ジョブ失敗した時とかのエラー処理全然書いてない。たぶんenum gearman_return_tを返せばいいんだろうけど strreverse-worker.c // 文字列をreverseして返すworker #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include 

  • 1