Gráfico de Commits

7 Commits

Autor SHA1 Mensagem Data
Jan Oravec c6f4e6b3c7 Recover from C++ exceptions in AsioExternalThreadEvent::unserialize(), part 2
AsioExternalThreadEvent::unserialize() may legally throw PHP exceptions.
When that happens, construction of PHP exceptions reenters VM, surprised
flag is checked and pending C++ exceptions may be thrown.

Let's make sure the queue of received events in runUntil() is not lost.
Move this responsibility to the AsioExternalThreadEventQueue.
2013-06-17 13:02:11 -07:00
Jan Oravec 797a6822d0 Move external thread event queue logic from AsioSession to AsioExternalThreadEventQueue
External thread event queueing logic is big enough that it deserves its
own class. Move the code and rename members to better reflect the
underlying operations. Implementation is otherwise unchanged.
2013-06-17 13:02:11 -07:00
Tim Starling 998951619f update copyright date
We did not intend to imply our copyrights last forever

Closes #759
2013-06-03 12:43:56 -07:00
Jan Oravec 935011733c Make AsioExternalThreadEvent::abandon() not hit assertion error
Destructor of AsioExternalThreadEvent uses assert() to check whether the
state is legal. Introduction of abandon() mechanism makes it possible to
destroy the AsioExternalThreadEvent in the Waiting state and hit the
assertion error.

This diff solves the problem by introducing Abandoned state.
2013-05-30 17:33:00 -07:00
Sara Golemon 6ec64e8bf9 make #includes consistent
I was learning from @jdelong and he said that you should use
double quotes for local includes and angle brackets for library
includes. I asked why our code was the way it was, and he said he wanted
to clean it up. I beat him to it :)

Conflicts:

	hphp/runtime/base/server/admin_request_handler.cpp
	hphp/runtime/vm/named_entity.h
2013-05-15 13:05:06 -07:00
Jan Oravec f2cf5fbaac Provide safe storage for private PHP data in external thread events
Sometimes, a PHP object (usually defined by extension) is needed to
unserialize the data.

Provide a safe mechanism to store such object with external thread
events.
2013-05-09 11:33:22 -07:00
Jan Oravec 88687ba6f7 Add support for external thread events
Add support for external thread events.

See asio_external_thread_event.h for details about usage.

This is the first version that compiled, the code was not executed even
once, but wanted to get it out early to unblock @hannesr. Thus the [RFC]
flag.

My next step is to implement asio-compatible equivalent of
fb_call_user_func_async() that will make it possible to easily test the
new functonality by simulating async stuff with sleep(), etc. on the PHP
side.

There are 2 major mostly lockless synchronization points that needs
careful review:

- queue of ready external thread events (asio_session.{cpp.h})
- shutdown cleanup (asio_external_thread_event.{cpp,h})
2013-05-02 10:14:16 -07:00