Skip to content

Circular dependencies with state #236

Answered by Totodore
prabirshrestha asked this question in Q&A
Discussion options

You must be logged in to vote

You could also have a fn set_io that would set it on the AuthService but it would require to put a Rwlock.

But I think the best way is to just have functions that takes a SocketIo ref as argument each time it is needed.

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Totodore
Comment options

Comment options

You must be logged in to vote
3 replies
@tausifcreates
Comment options

@Totodore
Comment options

Answer selected by prabirshrestha
@prabirshrestha
Comment options

Comment options

You must be logged in to vote
2 replies
@Totodore
Comment options

@neckaros
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants