Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 25 16:38
  • Nov 25 06:37
  • Nov 25 05:26
    BloodeyedZhang starred actor-framework/actor-framework
  • Nov 22 07:42
    Neverlord labeled #1367
  • Nov 22 05:49
  • Nov 22 04:48
    chuanyi closed #1367
  • Nov 22 04:48
    chuanyi commented #1367
  • Nov 22 02:03
    chuanyi opened #1367
  • Nov 20 11:52
  • Nov 19 21:35

    Neverlord on neverlord

    Fix edge case on the SPSC buffe… Fix error propagation in fused … Improve coverage of from_resour… (compare)

  • Nov 19 08:43
  • Nov 19 08:09
    Neverlord milestoned #1366
  • Nov 19 08:09
    Neverlord milestoned #1365
  • Nov 19 08:09
    Neverlord milestoned #1364
  • Nov 19 08:07
    Neverlord labeled #1366
  • Nov 19 08:07
    Neverlord opened #1366
  • Nov 18 20:54

    Neverlord on neverlord

    Improve coverage of from_contai… (compare)

  • Nov 18 20:44

    Neverlord on neverlord

    Improve coverage of from_callab… (compare)

  • Nov 18 08:08
    Neverlord labeled #1365
  • Nov 18 08:08
    Neverlord opened #1365
Dominik Charousset
@Neverlord
Basically by doing the same steps that CAF_MAIN otherwise does for you. Here's our setup for the I/O module tests: https://github.com/actor-framework/actor-framework/blob/master/libcaf_io/test/io-test.cpp.
Hope that works for you as a template.
yosefabedelfattah
@yosefabedelfattah
Thanks Dominik , so basically this is teh line from your code init_global_meta_objects<id_block::io_test>(); that shows the new atom types
Dominik Charousset
@Neverlord
Yes, this is where you add your own types.
yosefabedelfattah
@yosefabedelfattah
yep that worked thanks again
Dominik Charousset
@Neverlord
👍
yosefabedelfattah
@yosefabedelfattah
Hi Domminik , i got another question please, within an actor behavioure function can i send request to another Actor and wait till the other Actor return the result then return from the behavioure function ?
Dominik Charousset
@Neverlord
No, actors are non-blocking.
You could send the request using request()..await() and then set the behavior later by calling become, though.
yosefabedelfattah
@yosefabedelfattah
do you have any idea why i get this error the FirstController Actor works fine it just when calling it from the Test
Dominik Charousset
@Neverlord
Without source code it's anyone's guess. Probably the actor just isn't responding, though. I strongly suggest consulting trace logs for such cases: https://www.cafcademy.com/gems/indenting-trace-logs.
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.