Make Client thread-safe & add docs #495

Merged
6543 merged 6 commits from :doc-concurrency into master 2021-03-04 20:19:56 +00:00
Member

fix #494

fix #494
noerw added 1 commit 2021-03-03 06:57:12 +00:00
docs: mention thread-safeness
All checks were successful
continuous-integration/drone/pr Build is passing
c0e50a6b46
6543 added 1 commit 2021-03-03 23:04:48 +00:00
use mutex
All checks were successful
continuous-integration/drone/pr Build is passing
7084a556a9
6543 changed title from docs: mention Client thread-safeness to Make Client thread-safe & add docs 2021-03-04 00:07:52 +00:00
6543 added the
kind/docs
label 2021-03-04 00:08:02 +00:00
6543 added 1 commit 2021-03-04 00:15:10 +00:00
simplify & finish
All checks were successful
continuous-integration/drone/pr Build is passing
969df574f9
6543 added the
kind/enhancement
label 2021-03-04 00:16:25 +00:00
6543 added this to the v0.14.0 milestone 2021-03-04 00:16:29 +00:00
6543 added 1 commit 2021-03-04 12:53:51 +00:00
get client ref within thread-save code
All checks were successful
continuous-integration/drone/pr Build is passing
6e7f81a3a6
6543 approved these changes 2021-03-04 12:55:02 +00:00
Dismissed
Author
Member

lgtm

lgtm
Owner

We could add -race flag on ci test and also add a test with two goroutines to use the client.

We could add -race flag on ci test and also add a test with two goroutines to use the client.
Owner
@lunny @jolheiser we already do! https://gitea.com/gitea/go-sdk/src/branch/master/Makefile#L77
6543 added 1 commit 2021-03-04 18:15:26 +00:00
same with c.debug
All checks were successful
continuous-integration/drone/pr Build is passing
308a9e73ca
6543 added 1 commit 2021-03-04 18:24:50 +00:00
find posible race cond outside client.go
All checks were successful
continuous-integration/drone/pr Build is passing
1b45e79cf6
6543 approved these changes 2021-03-04 18:25:13 +00:00
Dismissed
6543 left a comment
Owner

this should it finaly be :O

this should it finaly be :O
zeripath approved these changes 2021-03-04 20:15:17 +00:00
Dismissed
zeripath left a comment
Owner

OK I think this is right.

It might be helpful to extract a small core struct that has the functions that use internal fields and hence need to be locked.

That way you can be sure that the locking is correct - at present there are so so many functions that ensuring that they are always safe will be hard.

OK I think this is right. It might be helpful to extract a small core struct that has the functions that use internal fields and hence need to be locked. That way you can be sure that the locking is correct - at present there are so so many functions that ensuring that they are always safe will be hard.
6543 merged commit ff82113459 into master 2021-03-04 20:19:56 +00:00
6543 deleted branch doc-concurrency 2021-03-04 20:20:16 +00:00
Sign in to join this conversation.
No description provided.