void wait_executor_written()

in src/afs.cc [1110:1136]


	void wait_executor_written(SessionData* session, SharedRingBuffer* buffer)
	{
		if (ARROW_PREDICT_FALSE(session->executorPID == InvalidPid))
		{
			ereport(ERROR,
			        errcode(ERRCODE_INTERNAL_ERROR),
			        errmsg("%s: %s: executor isn't alive", Tag, tag_));
		}

		P("%s: %s: %s: kill executor: %d", Tag, tag_, AFS_FUNC, session->executorPID);
		kill(session->executorPID, SIGUSR1);
		auto size = buffer->size();
		std::unique_lock<std::mutex> lock(mutex_);
		conditionVariable_.wait(lock, [&] {
			P("%s: %s: %s: wait: write: %d:%d",
			  Tag,
			  tag_,
			  AFS_FUNC,
			  buffer->size(),
			  size);
			if (INTERRUPTS_PENDING_CONDITION())
			{
				return true;
			}
			return buffer->size() != size;
		});
	}