thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Aloi <roberto.a...@erlang-solutions.com>
Subject Re: Function clause on "oneway_void" [Thrift-Erlang]
Date Wed, 08 Sep 2010 09:43:33 GMT
Hi there,

> Would that work?  You said you were returning {ok, pid()}, not {reply,
> Whatever}.

That works cause my service was based on Todd's skeleton for Erlang:

http://github.com/toddlipcon/thrift_erl_skel/blob/master/thrift_skel/src/thrift_skel_service.erl

where the handle_function is wrapping the reply into a tuple if it is different from 'ok'.
If this is desirable, I guess that's another story.


> How about just changing "ok when ReplyType == oneway_void"
> to "_ when ReplyType == oneway_void"?

Sure, but you still might want to report the event (a non expected reply is something I would
like to identify, not simply ignore).
But yes, that will definitely work.

Thanks for this,

Roberto Aloi
-- 
University of Kent - Erlang Solutions Ltd.
Blog: http://aloiroberto.wordpress.com
Twitter: @prof3ta


Mime
View raw message