Fix lockup issue occurred while stress test for filesystem
authorJihye Kang <jye.kang@samsung.com>
Tue, 9 Apr 2013 15:57:54 +0000 (00:57 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 11 Apr 2013 08:17:52 +0000 (17:17 +0900)
commit2f1de73401b443e4cf2065c2f19a243c8fe5364a
tree6706823c07ca2e847f2ed1796683240ef04c6634
parent559c0f56d9be07c6bc73aeb79010fe696b52fc98
Fix lockup issue occurred while stress test for filesystem

[Title] Fix lockup issue occurred while stress test for filesystem
[Issue#] N/A
[Problem] Lockup occurs while calling writer.write() stressfully
[Cause] ecore_pipe_write() is blocked because PIPE_BUF is full with O_NONBLOCK disabled for waiting the pipe is ready to write.
But pipe cannot be consumed because main thread is blocked because ecore_pipe_write() is blocked.
[Solution] dispatchFunctionsFromMainThread(), called by registered Ecore_Pipe_Cb for the pipe, consume functionQueue as many as possible until maxRunLoopSuspensionTime is reached.
It means ecore_pipe_write() does not needed to be called when waiting for pipe is read. - write:read does not need to be 1:1 call.
So add flag for check whether scheduled request waiting for read exists or not.

Change-Id: I58a2724c1eb33c1565a88844cc87e33ee576a6d4
Source/WTF/wtf/Platform.h
Source/WTF/wtf/efl/MainThreadEfl.cpp