Skip to content

Commit 92cc6a1

Browse files
docs(grpc): warning for multiple threads (#3747)
* feat: raise error when GRPCClient is raised outside the main thread * docs: showcase grpc client threading limitation * docs: add note * chore: apply suggestions * test: add grpc client threading * chore: reformat error message * chore: apply suggestions * chore: apply suggestions * docs(grpc): warning for multiple threads * revert(grpc): raise if non-main thread Co-authored-by: Deepankar Mahapatro <deepankar.mahapatro@jina.ai>
1 parent 5708252 commit 92cc6a1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/fundamentals/flow/flow-as-a-service.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ c.post('/')
102102
GRPCClient@14744[S]:connected to the gateway at 0.0.0.0:12345!
103103
```
104104

105+
106+
````{warning}
107+
108+
Multiple gRPC Client cannot be spawned using `Threads` because of an [upstream issue](https://github.com/grpc/grpc/issues/25364). Use `multiprocessing` instead.
109+
````
110+
111+
105112
### via WebSocket
106113

107114
```python

tests/unit/test_gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_compression(compress_algo):
2222

2323

2424
@pytest.mark.slow
25-
@pytest.mark.parametrize('protocol', ['websocket', 'grpc', 'http'])
25+
@pytest.mark.parametrize('protocol', ['websocket', 'http'])
2626
def test_gateway_concurrency(protocol, reraise):
2727
PORT_EXPOSE = 12345
2828
CONCURRENCY = 2

0 commit comments

Comments
 (0)