Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 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
  • Sep 19 10:34
    zhihuiLiang commented #1353
  • Sep 19 06:05
    Neverlord closed #1353
Dominik Charousset
@Neverlord
Usually you'd just link them. As long you don't introduce circular ref counts, the chain should also disappear if you drop the reference to the head. If it doesn't the trace logs are a good source to see what actors don't terminate. ;)
Matt Youill
@matt.youill_gitlab
Hi, question about actor spawning. What's the recommended way to report a failure in an actor spawning functor? Just self->quit() with an error message?
Dominik Charousset
@Neverlord
Yep, pretty much.
JoaoMarinho
@JoaoAMarinho
Hello, i am having an issue with caf. So i have two actors one reading from a can socket and the other receiving a message from the first one. I tried to send the struct can_frame ( i added the class inspector to it), but i am having a segmentation fault, can anyone provide some tips?
Dominik Charousset
@Neverlord
A common issue is not passing your type ID block to CAF_MAIN (or calling init_global_meta_objects if you write a custom main, cf. https://github.com/actor-framework/actor-framework/blob/master/libcaf_core/caf/init_global_meta_objects.hpp#L61).
In any case, I'd run it through a debugger so see where it crashes exactly.
JoaoMarinho
@JoaoAMarinho
Thanks. Also is there a way to create an actor that can access static information of his own when receiving a message, I'm trying to use a event/function based actor although without success.
Dominik Charousset
@Neverlord
I'm not sure what "static information" means. Global static variables? They are accessible anywhere, though. Maybe this article helps: https://www.cafcademy.com/articles/implementing-actors-part-1
JoaoMarinho
@JoaoAMarinho
Information that changes just inside that actor workspace.
JoaoMarinho
@JoaoAMarinho
Hello, i am trying to create an inspector for a class, although not having much success, which are the things neeeded in the inspect function for it to work?
Dominik Charousset
@Neverlord
Have a look at the examples: https://github.com/actor-framework/actor-framework/tree/master/examples/custom_type. Also the manual section on that topic if you haven't already.
JoaoMarinho
@JoaoAMarinho
Thank you. The problem i ran into, is a segmentation fault error ( so i think the solution would be the missing of an inspector), but my class is from another library, and there are no getters so i can't mimic the examples. What do you recommend
Dominik Charousset
@Neverlord
Did you consult your debugger about that assumption? Regarding the inspect, well, I can't recommend something without knowing what you're working with. :)
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