src/actors.c
struct msg *actor_inbox_pop(struct actor *self)
{
	struct msg *msg;

	for (;;) {
		msg = msg_box_pop(&self->inbox);

		if (!msg)
			break;

		if (!self->filter || self->filter(self, msg))
			break;

		msg_box_push(&self->buf, msg);
	}

	return msg;
}
/* Remove a message from the actor's inbox.
 *
 * Only a single thread should calls this. This only ever blocks while a
 * message is being enqueued.
 *
 * If a filter is set then only messages which pass the filter will be
 * popped. Others will be buffered until the filter is changed.
 */
Remove a message from the actor's inbox.
Only a single thread should calls this. This only ever blocks while a
message is being enqueued.

If a filter is set then only messages which pass the filter will be
popped. Others will be buffered until the filter is changed.
Remove a message from the actor ' s inbox . Only a single thread should calls this . This only ever blocks while a message is being enqueued . If a filter is set then only messages which pass the filter will be popped . Others will be buffered until the filter is changed .
struct msg *actor_inbox_pop(struct actor *self)
{
	struct msg *msg;
	for (;;) {
		msg = msg_box_pop(&self->inbox);
		if (!msg)
			break;
		if (!self->filter || self->filter(self, msg))
			break;
		msg_box_push(&self->buf, msg);
	}
	return msg;
}
struct msg * actor_inbox_pop ( struct actor * self ) { struct msg * msg ; for ( ; ; ) { msg = msg_box_pop ( & self -> inbox ) ; if ( ! msg ) break ; if ( ! self -> filter || self -> filter ( self , msg ) ) break ; msg_box_push ( & self -> buf , msg ) ; } return msg ; }
Remove a message from the actor's inbox.
Remove a message from the actor ' s inbox .