How to determine the number of elements in RemoteChannel?

Hi Community!

The simple Cannel show the current number of elements directly:

B = Channel(2)


the sz_curr is current numbers of elements in channel.

In case of RemoteChannel I can’t see something like sz_curr:

jobs = RemoteChannel(()->Channel{Any}(100));

RemoteChannel{Channel{Any}}(1, 1, 4)

so it prints only type of RemoteChannel.

How to see current numbers of elements in RemoteChannel?

As I understand it, since RemoteChannel is essentially a reference to a Channel{Any}(1), the number of values it has stored is either 0 or 1. You can distinguish between these two cases using isready.

I try for understand how to view numbers of elements for logging purposes. Anyway, in case of Channel it is really clean. But RemoteChannel is a black box. For example in RemoteChannel{Channel{Any}}(1, 1, 4) the (1, 1, 4) is not informative at all.

Moved it to Parallel/Distributed