Commit Graph

6 Commits

Author SHA1 Message Date
Joel Stanley
72160cea89 Fixes a concurrency bug wherein a thread (running beyond the maximum number of
pluckers) would register a CQ notification via
grpc_server_request_registered_call prior to obtaining pluck permission, block
on acquiring such permission, and thus miss notification of the server call.

The bug can could be witnessed with particular interleavings by ensuring that
GRPC_MAX_COMPLETION_QUEUE_PLUCKERS server threads are blocked on their own
server call notifications, and then using the
(GRPC_MAX_COMPLETION_QUEUE_PLUCKERS+1)th server thread to attempt to block on a
notification for an additional server call.

In order to fix this, we simply extended the pluck permission held window for
serverRequestCall, and created a variant of pluck (called pluck') which assumes
permission to pluck is already held by the calling thread.
2016-07-10 17:15:57 -05:00
Connor Clark
a530faf912 Channel options: user agents and compression (#32)
* get_peer: fix todo

* add documentation for server registered call function

* test roundtrip conversion of larger bytestrings (32 mb)

* Add channel args interface: currently supports user agents and compression.

* fix build failure after stack clean
2016-06-22 13:07:38 -07:00
Joel Stanley
8069ebba07 Rename reg operations in all modules; use qualified imports whenever selecting unregistered variants 2016-06-08 15:29:12 -05:00
Joel Stanley
d46c0c1c94 Distinguish hostnames vs "host:port" strings; minor echo client cleanup (#20)
* Remove explicit host:port parameter from clientRequest

* Save ClientConfig in Client ADT; derive host:port string as needed

* Add Port newtype and endpoint string constructor fn

* Introduce Endpoint newtype for host:port strings; derive them as needed; misc cleanup

* Clean up echo client
2016-06-06 12:54:43 -05:00
Joel Stanley
8a31c475ac Also fix clientRegisterMethod use in echo client example 2016-06-05 17:12:13 -05:00
Connor Clark
ce56953b24 Various example/benchmarking code (#16)
* initial echo client/server examples

* registered and unregistered versions of the example client

* ignore pyc files

* cpp echo code, flag to build examples

* threaded server example
2016-06-03 10:34:09 -07:00