Hi All,
Implementing a similar thing, but with an asynchronous client in python. I
can't for the life of me get the client object to become derefenced.
The asyncio tx/rx seems to get stuck trying to read/write to the
now-missing publisher.
I think the async loop owns a reference to the subscri
What I usually do is something like:
auto impl = kj::heap();
auto& ref = *impl;
Subscriber::Client client = kj::mv(impl);
rq.setSubscriber(client);
Now you can keep a copy of `client` locally, and as long as it still
exists, then `ref` remains valid -- because `client` is itself a strong
referenc
I'm also implementing pub-sub, so I was glad to see this thread before I
wasted too much time. I'm implementing this pattern, but having trouble on
the client side.
In terms of the example interface, I've created my SubscriberImpl class,
and written the code to send the "subscribe" message. Now
Hi Kenton,
Thank you for your quick response! It's very helpful because the handler
for the disconnection is another issue actually.
On Tuesday, November 23, 2021 at 1:53:42 AM UTC+9 ken...@cloudflare.com
wrote:
> Hi Mitsuo,
>
> I recommend designing the interface like this:
>
> interface Even
Hi Mitsuo,
I recommend designing the interface like this:
interface EventPublisher{
interface Subscriber {
updateEvent @0 (event: Int32) -> ();
}
interface Subscription {}
subscribe @0 (subscriber: Subscriber) -> (result: Int32, subscription:
Subscription);
# To unsubs