summaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-01-22 16:58:18 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-29 23:49:33 +0300
commit0e39510c05965ab56ebb9134490678ebae85c192 (patch)
tree1e960e4b938c96bb1e62eb74c5845a126e72e02f /src/meson.build
parent6b98965877a87deffc87388c66f62bb28539aaed (diff)
libcamera: thread: Remove the unused setEventDispatcher() function
Custom event dispatchers for threads was an API meant to provide a way to integrate libcamera in the application's event loop. This isn't used anymore, as libcamera now creates internal threads. Drop the unused Thread::setEventDispatcher() function, and update the documentation accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/meson.build')
0 files changed, 0 insertions, 0 deletions
='n118' href='#n118'>118 119 120 121 122 123 124 125 126 127 128 129
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2019, Google Inc.
 *
 * threads.cpp - Threads test
 */

#include <chrono>
#include <iostream>
#include <memory>
#include <thread>

#include <libcamera/base/thread.h>

#include "test.h"

using namespace std;
using namespace libcamera;

class DelayThread : public Thread
{
public:
	DelayThread(chrono::steady_clock::duration duration)
		: duration_(duration)
	{
	}

protected:
	void run()
	{
		this_thread::sleep_for(duration_);
	}

private:
	chrono::steady_clock::duration duration_;
};

class ThreadTest : public Test
{
protected:
	int init()
	{
		return 0;
	}

	int run()
	{
		/* Test Thread() retrieval for the main thread. */
		Thread *mainThread = Thread::current();
		if (!mainThread) {