Skip to content

Conversation

zmajeed
Copy link
Contributor

@zmajeed zmajeed commented Oct 1, 2024

Return 0 for CPU ID if CPU ID cannot be determined and thread ID cannot be used because threads are disabled - fix issue #14189

@szarnyasg szarnyasg requested a review from hannes October 2, 2024 09:39
@hannes
Copy link
Member

hannes commented Oct 2, 2024

Thanks for your PR, I think it would be better to follow the other functions in the file and whatever Emscripten does and just return 0. The only place this is used in figuring out a cache slot in the buffer pool, which is not relevant when we compile without threads. E.g.

idx_t TaskScheduler::GetEstimatedCPUId() {
#ifndef DUCKDB_NO_THREADS
// other stuff
#else
	return 0;
#endif
}

@duckdb-draftbot duckdb-draftbot marked this pull request as draft October 2, 2024 11:11
@hannes hannes marked this pull request as ready for review October 2, 2024 12:10
@Mytherin Mytherin merged commit 350d061 into duckdb:main Oct 3, 2024
42 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Oct 3, 2024

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Oct 16, 2024
Issue 14189: Fix build when threads are disabled (duckdb/duckdb#14190)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Oct 16, 2024
Issue 14189: Fix build when threads are disabled (duckdb/duckdb#14190)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants