[jira] [Commented] (THRIFT-2295) Make "oneway" more generic
[ https://issues.apache.org/jira/browse/THRIFT-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857666#comment-13857666 ] Martin Vogt commented on THRIFT-2295: - >> None = 0x01 ... >>Only for the Bit-test. (x & 0x0 = 0x0). >I would expect None to be literally "no bits set". I have change that, including the uppercase MOD to e_mod, which looks now more like the other enum implementations. >>most likely the person who implemented oneway didn't know it too >Not quite, I think. The keyword oneway lets the code generator behave >differently: It omits >the whole recv_Xxx() response part. Yes, signal/slot have a void return and similar behaviour as "oneway". Another reason is that some blocking must be avoided. A client can issue a call to a server and gets some return value, like {quote} service MyService { i32 getRandom(); } {quote} If the server then emits a signal during getRandom and the client is connected to the signal (+tcp stack full) there is a deadlock. So I think, the marshalling must be different for signal/slots too. But this patch only makes the "oneway" implementation more generic. > Make "oneway" more generic > -- > > Key: THRIFT-2295 > URL: https://issues.apache.org/jira/browse/THRIFT-2295 > Project: Thrift > Issue Type: Improvement > Components: Compiler (General) >Affects Versions: 0.9.1 >Reporter: Martin Vogt >Priority: Trivial > Attachments: functionModifiers131227v1.patch > > > I'm experimenting with different function modifiers > ("oneway","signal","slot", etc...) > The current code does not make such tests easy, because the "oneway" > modifier is hardcoded as bool. > The following patch improves the optional function modifier to be more > generic. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (THRIFT-2295) Make "oneway" more generic
[ https://issues.apache.org/jira/browse/THRIFT-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Vogt updated THRIFT-2295: Attachment: (was: functionModifiers.patch) > Make "oneway" more generic > -- > > Key: THRIFT-2295 > URL: https://issues.apache.org/jira/browse/THRIFT-2295 > Project: Thrift > Issue Type: Improvement > Components: Compiler (General) >Affects Versions: 0.9.1 >Reporter: Martin Vogt >Priority: Trivial > Attachments: functionModifiers131227v1.patch > > > I'm experimenting with different function modifiers > ("oneway","signal","slot", etc...) > The current code does not make such tests easy, because the "oneway" > modifier is hardcoded as bool. > The following patch improves the optional function modifier to be more > generic. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (THRIFT-2295) Make "oneway" more generic
[ https://issues.apache.org/jira/browse/THRIFT-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Vogt updated THRIFT-2295: Attachment: functionModifiers131227v1.patch changed None->0x0 and renamed MOD to e_mod, which is like the other enums. > Make "oneway" more generic > -- > > Key: THRIFT-2295 > URL: https://issues.apache.org/jira/browse/THRIFT-2295 > Project: Thrift > Issue Type: Improvement > Components: Compiler (General) >Affects Versions: 0.9.1 >Reporter: Martin Vogt >Priority: Trivial > Attachments: functionModifiers.patch, functionModifiers131227v1.patch > > > I'm experimenting with different function modifiers > ("oneway","signal","slot", etc...) > The current code does not make such tests easy, because the "oneway" > modifier is hardcoded as bool. > The following patch improves the optional function modifier to be more > generic. -- This message was sent by Atlassian JIRA (v6.1.5#6160)