Skip to content
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

feat(wamp-server) #76: optional timeout in callBlocking #77

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

lilgallon
Copy link
Member

If unset, use default one given by wamp server settings

closes #76

Copy link
Contributor

@xhanin xhanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il y a un problème sur la gestion de la concurrence, à traiter. Pour le reste c'est bon, il faudra penser par contre à indiquer dans la version de la lib qu'il y a un breaking change dans l'api, les valeurs par défaut sont gérées uniquement à la compilation et en kotlin, si on a un code java ou si on ne recompile pas un code kotlin qui utilise le callBlocking ou sendBlocking ça ne marchera pas. Ca me parait acceptable il faut juste l'indiquer dans les release notes.

while (currentCall != null && (Clock.System.now() - now).inWholeMilliseconds < timeoutInMs) {
val capturedCurentCall = currentCall
while (
capturedCurentCall != null &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on change le comportement ici, on ne vérifie plus le currentCall à chaque iteration, mais uniquement le capturedCurrentCall avant l'entrée dans la boucle. Et donc on ne sortira pas de la boucle si un event concurrent met le call à null.

Copy link
Contributor

@xhanin xhanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

@lilgallon lilgallon force-pushed the feat/#76-optional-timeout-send-blocking branch from f8101d9 to 749fc10 Compare September 17, 2024 07:28
Copy link

sonarcloud bot commented Sep 17, 2024

@lilgallon lilgallon merged commit bd8e733 into dev Sep 17, 2024
2 checks passed
@lilgallon lilgallon deleted the feat/#76-optional-timeout-send-blocking branch September 17, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add optional timeout in sendBlocking
2 participants