New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numOfThreads/numberOfThreads inconsistency #432

Closed
gmosx opened this Issue May 23, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@gmosx
Copy link

gmosx commented May 23, 2018

Expected behavior

let group = MultiThreadedEventLoopGroup(threadCount: System.coreCount)
let threadPool = BlockingIOThreadPool(threadCount: 6)

Actual behavior

let group = MultiThreadedEventLoopGroup(numThreads: System.coreCount)
let threadPool = BlockingIOThreadPool(numberOfThreads: 6)

Please notice the inconsistency between numThreads and numberThreads. Also, it would be better to use the count name used in the standard library.

@normanmaurer

This comment has been minimized.

Copy link
Member

normanmaurer commented May 24, 2018

@Lukasa @weissi WDYT... I am also ok with count but I think numberThreads or numThreads are a bit more descriptive... At least we should make it consistent :)

@weissi

This comment has been minimized.

Copy link
Contributor

weissi commented May 24, 2018

I think that's a fair enough issue and I think we should fix numThreads at least. Whether the parameters should be threadCount: or numberOfThreads: or something can be bikeshed I don't really mind

@gmosx

This comment has been minimized.

Copy link
Author

gmosx commented May 24, 2018

I don't mind numberOfThreads but I think numThreads should be renamed.

normanmaurer added a commit to normanmaurer/swift-nio that referenced this issue May 24, 2018

Rename numThreads to numberOfThreads parameter.
Motivation:

We should be consistent with naming and also choose descriptive names.

Modifications:

- Deprecate old init method that uses numThreads
- Add new init with numberOfThreads param name
- Everywhere use the new init

Result:

More consistent and descriptive naming. Fixes apple#432.

normanmaurer added a commit to normanmaurer/swift-nio that referenced this issue May 25, 2018

Rename numThreads to numberOfThreads parameter.
Motivation:

We should be consistent with naming and also choose descriptive names.

Modifications:

- Deprecate old init method that uses numThreads
- Add new init with numberOfThreads param name
- Everywhere use the new init

Result:

More consistent and descriptive naming. Fixes apple#432.

normanmaurer added a commit that referenced this issue May 25, 2018

Rename numThreads to numberOfThreads parameter. (#443)
Motivation:

We should be consistent with naming and also choose descriptive names.

Modifications:

- Deprecate old init method that uses numThreads
- Add new init with numberOfThreads param name
- Everywhere use the new init

Result:

More consistent and descriptive naming. Fixes #432.

@normanmaurer normanmaurer added this to the 1.8.0 milestone May 25, 2018

@Lukasa Lukasa removed this from the 1.8.0 milestone May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment