Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 18:30
    Neverlord closed #1351
  • 18:30
    Neverlord labeled #1351
  • Sep 24 13:17

    Neverlord on neverlord

    Get rid of detail::shared_spinl… Re-implement work-stealing queu… Fix performance bottleneck: vec… and 1 more (compare)

  • Sep 24 06:17
  • Sep 23 15:13
    Neverlord commented #1343
  • Sep 23 09:55
    mpoeter commented #1343
  • Sep 23 08:06
    uentity commented #1343
  • Sep 20 20:48
    dylan-baros closed #1354
  • Sep 20 20:48
    dylan-baros commented #1354
  • Sep 20 18:46
    dylan-baros commented #1354
  • Sep 20 18:45
    dylan-baros commented #1354
  • Sep 20 18:42
    dylan-baros commented #1354
  • Sep 20 18:41
    dylan-baros reopened #1354
  • Sep 20 17:27
    dylan-baros commented #1354
  • Sep 20 17:26
    dylan-baros closed #1354
  • Sep 20 16:55
    dylan-baros edited #1354
  • Sep 20 16:42
    dylan-baros opened #1354
  • Sep 19 13:59
    zhihuiLiang commented #1353
  • Sep 19 13:31
    Neverlord commented #1353
  • Sep 19 10:43
JoaoMarinho
@JoaoAMarinho
Yes
mustafma
@mustafma
Hi, I have a question related to caf test. I have two actors classes A and B. Inside A's constructor, I'm spawning actor B. Inside the make_behavior of actor A, I'm sending a request to Actor B. From CAF_TEST case, I spawn actor A and do the CAF_CHECK inside the send.receive(..){...}. The problem is that the test is never stopped - timed out after 30sec. Actor B is actually doing nothing besides returning a string in the make_behavior function. If we remove the send from A to B, the test works fine. Do you have an idea what I'm doing wrong here ?
We saw on the roadmap, that the testing framework will be overhauled. Do you have an estimate of when that might happen?
Dominik Charousset
@Neverlord
Hard to tell without seeing code. Deterministic setup? Are you missing a call to run, run_once, expect, ...?
2 replies
Overhaul: no timeline at the moment. Definitely not this year.
Dominik Lohmann
@dominiklohmann
I ran into an issue earlier today when I wanted to check whether two actors were running in the same actor system / process. I first tried a.home_system().node() != b.home_system().node(), but then realized these both return the same node_id. I then tried a.node() != b.node(), which works as expected. Is this a bug, or am I just misunderstanding? I am still on CAF 0.17.6.
Dominik Charousset
@Neverlord
Running multiple actor systems in the same process is unsafe unless they either never interact with each other or communicate over localhost connections.
Matt Youill
@matt.youill_gitlab
Hi again. Another edge case... I'm trying to destroy an actor system and then recreate it for the purpose of changing configuration. Is this supported? I'm running into an issue where I can create a second actor system (with a different number of threads) but it hangs if I then try to destroy this second instance. Seems to hang in the actor system destructor on the logger dtor mutex.
Dominik Charousset
@Neverlord
No, restarting actor systems or multiple actor systems in one process is not supported.
JoaoMarinho
@JoaoAMarinho
Hello, is there any example with the link_to function as i try to use it to force actors to die when one dies, but that does not happen. Thank you.
Dominik Charousset
@Neverlord

This might help: https://www.cafcademy.com/articles/monitoring-and-linking

If "nothing happens": are you just doing regular shutdown? Links only tear down other actors in case of an error.

JoaoMarinho
@JoaoAMarinho
I have one actor receiving input and the other is working, when i input exit i want to quit the inputing actor therefore making the worker die as well
how can i achieve such behaviour
Dominik Charousset
@Neverlord
If you trigger the shutdown from external you could just send exit_reason::user_shutdown.
JoaoMarinho
@JoaoAMarinho
What if i don't have the pointer to the receiving actor saved.
Ok It's working, than you.
Dominik Charousset
@Neverlord
👍
Matt Youill
@matt.youill_gitlab
thanks @Neverlord
chq
@hanakeichen
Hi, I'm trying to write testing code with the broker based on https://github.com/actor-framework/actor-framework/blob/52914200de6f13c7efa3e38c8904064b3b916670/libcaf_io/test/io/http_broker.cpp, then call broker->send(buddy) to another actor in line 141. But the test failed when asserting the output buffer's size in line 200 because the buffer is empty
8 replies
I already tried to call test_coordinatorfixture::run after mpx->virtual_send , but nothing changed
yosefabedelfattah
@yosefabedelfattah
Hi , I have acode the is running in seperate thread and need to call Request from that thread to pass amessage of data to specific actor that was already spawned and i have refrence to it , is that possible ? what is happenning if i move the call of request to main thread it works fine however if it is called from the seperated thread as described above i get error sigmentation fault .
1 reply
JoaoMarinho
@JoaoAMarinho
What is the best example to start understanding the middleman component of caf?
Dominik Charousset
@Neverlord
JoaoMarinho
@JoaoAMarinho
No, I'll give it a look
JoaoMarinho
@JoaoAMarinho
Can a function-based actor, not the behavior type one, receive messages from other actors, or set an handler for these messages? So that if he receives a msg executes the handler and continues is work.
Dominik Charousset
@Neverlord
Maybe I don't get the question, but yeah, that's pretty much the point of actors.
JoaoMarinho
@JoaoAMarinho
Ok i have an actor that is receiving user input, and i tell him to parse a file so i create another ator to read the file
and i want the parser to send to the first actor the file strings
without the inputting actor stopping its process
i tried to use a set default handler but not successfully
is there any examples on this function?
Dominik Charousset
@Neverlord
Not for this particular setup, but one the examples under message_passing should help you getting started: https://github.com/actor-framework/actor-framework/tree/master/examples/message_passing
JoaoMarinho
@JoaoAMarinho
I have already looked at the examples and could not find a way to solve this
Just want to know if an actor of this kind ""void parse_input(event_based_actor* self)"" can receive messages from other actors and how?
Dominik Charousset
@Neverlord
Well, you're not returning a behavior. Hence, this actor quits immediately after running the function body. You'd need to return a behavior instead of just returning void.
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