Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
JoaoMarinho
@JoaoAMarinho
Ok thanks. But a behavior returning actor needs to return immediatly right? so i can´t be receiving user input before returning the handlers
Dominik Charousset
@Neverlord
How is this actor "receiving" user input anyway? If you call some blocking function, make sure to detach the actor. :)
JoaoMarinho
@JoaoAMarinho
From the terminal. What does detaching an actor do precisely?
Dominik Charousset
@Neverlord
Please look it up in the manual.
JoaoMarinho
@JoaoAMarinho
Ok thank you.
mustafma
@mustafma
Hi, can I define enum class as a result of the custom atom definition? Trying to use that in typed_actor class ? Doing this fails in build. Do I need to define an inspector for such cases ?
Dominik Charousset
@Neverlord
The atom macros define empty structs. If you wish to use an enum, than it's just a custom type to CAF that need an inspect.
mustafma
@mustafma
image.png
Thanks. I have tried this with no success:
Dominik Charousset
@Neverlord
Can you define "no success"? What's the actual issue? Aside from the code running into UB since it's not returning a value.
Cem Degirmenci
@sputnikcem_twitter
Hello everyone
Dominik Charousset
@Neverlord
Hi! 👋
Cem Degirmenci
@sputnikcem_twitter
I was reading the code of the framework, and would like to ask what is upstream and downstream messages?
in the scheduled_actor class one can get 4 types of queues, urgent, normal, upstream and downstream forexample
Dominik Charousset
@Neverlord
This only relates to streaming pipelines. Hopefully this helps to clean up the terminology: https://actor-framework.readthedocs.io/en/stable/Streaming.html.
But be aware that this is an experimental feature and it looks like it's soon replaces with something else.
Cem Degirmenci
@sputnikcem_twitter
thank you!
Dominik Charousset
@Neverlord
Hope it helps. :)
Krzysztof Wrzalik
@kyku
Hi, I'm trying to fix a strange segfault from CAF
It is triggered from message_data::~message_data() after my message handler has returned. The the problem is with meta.destroy(ptr); line, in which detroy() is basically a null function pointer.
Krzysztof Wrzalik
@kyku
ok, my fault
doncoolhoney
@doncoolhoney_twitter
My hello program code doesnt work anyone caould please help??
unction "mirror" returns incomplete type "caf::behavior" and alot of other errors..
can anyone pleaase guide to run hello worlld program steps..... i have compiled camke completely...
Dominik Charousset
@Neverlord
I think that's out of scope for a chat like this. But I'm sure you can find good CMake tutorials online. Incomplete type usually means you didn't include the proper headers or your include paths aren't correct.
Cem Degirmenci
@sputnikcem_twitter
Hi I have created an example to study the difference between request.then and request.await. I have a scoped actor which sends 5 messages to a master actor and this master actor in its behavior sends a message to a slave actor which returns the sum of 2 integer and sleeps for 1 seconds.
It is as expected i.e. if I use then I see that masters behaviors are activated without waiting for slave answers
the question is when I use <message_priority::high> await does not function after the first call
is this expected?
image.png
image.png
Cem Degirmenci
@sputnikcem_twitter
image.png
Cem Degirmenci
@sputnikcem_twitter
ah I see, if the master also sends the message with high priority the problem is solved
Cem Degirmenci
@sputnikcem_twitter
can one use OpenMP with the Actor framework? I can compile and run the code but can only get a single omp thread running
Dominik Charousset
@Neverlord
Regarding the high-prio: you shouldn't need to forward it with hight priority. Mind making a minimal example and open a GitHub issue?
OpenMP: be careful when combining CAF with any other framework that spins up a thread pool on its own. If both are busy, you pay for a lot of context switches by overbooking the CPU.
Cem Degirmenci
@sputnikcem_twitter
for the OpenMP question -fopenmp should be added to both compile and link flags in the CMakefile if anyone wants to use it
doncoolhoney
@doncoolhoney_twitter

Anyone have a short but good example of middleman in CAF..Please share.. because I am facing issues in publishing....

invalid use of incomplete type ‘class caf::io::middleman’

Any small example please!..

Dominik Charousset
@Neverlord
Incomplete type usually means you're only having a forward declaration, i.e., you're missing the include. An example for publish/remote_actor is here: https://github.com/actor-framework/actor-framework/blob/master/examples/remoting/distributed_calculator.cpp.
Cem Degirmenci
@sputnikcem_twitter
hi the system has a registry() function to reach the actor_registry, but where is the proxy_registry instance? I checked middleman.hpp as well under io but could not find it so far
Dominik Charousset
@Neverlord
The proxy registry isn't accessible from outside the BASP broker. It's only an implementation detail for holding the state required to represent remote actor.
Cem Degirmenci
@sputnikcem_twitter
ok then I need to keep my own data structure
kapilpipaliya
@kapilpipaliya
how to stream video data from one actor to many actors?
Dominik Charousset
@Neverlord
There's currently no readily-available binding to gRPC or other messaging libraries.
Nannnnnn
@Nannnnnn

Hi everyone, I got a problem when I try to use request method like this, do you know why? Thanks!

void my_send(event_based_actor src, actor dst, char* message)
{
src->request(dst, std::chrono::seconds(10), message);

}

Dominik Charousset
@Neverlord
That's not how you use request. :)
You're not telling it what to do with the response and you can't take an event-based actor as value. Have a look at the example: https://github.com/actor-framework/actor-framework/blob/master/examples/message_passing/request.cpp.
Nannnnnn
@Nannnnnn
@Neverlord Thanks for your comment! Is there any workaround for sending a message by indicating the sender like send_msg(sender, receiver, ...) or any other type of actor can achieve that? a typed actor?
Dominik Charousset
@Neverlord
Can you explain a bit more what you're trying to do? Statically typed actors only allow the compiler to run type-checks on your message. Sender information is always encoded in messages regardless.
Nannnnnn
@Nannnnnn
I am trying to create a new message sending API that can send message as long as it knows the sender's pointer and receiver's pointer. It is sth. like: send_msg(sender pointer, receiver pointer, message body, ...)
Dominik Charousset
@Neverlord
Then that's just sender->send(receiver, ...), isn't it? Generally speaking, though, CAF does not hand out pointers because actors are supposed to share no state. You handles instead. Maybe this here helps you grok how CAF is structured: https://www.cafcademy.com/articles/implementing-actors-part-1