By GuiedGui
08 Nov 2020 05:59
Category: New Feature
Not sure where I brought up the problem of empty shoutboxes and the possibility of DSis not supporting more than one AJAX request, but this is related to that. If a Helpdeskmin can find and link it below, please do.
This proposed feature would be a fix to that problem.
The problem: shoutboxes can end up empty after sending messages due to concurrent modification. While one thread clears the shoutbox, another one tries to read it (or something like that), and one thread breaks down. That or a possible deadlock. Either way, more than one thread is accessing what should be only one-threaded.
There's multiple ways of going about this. One way is to stop the previous reoccuring refresh function in favor of a new reoccuring one, but this may also run into the same issue. This can be alleviated by waiting for the stop of execution of the current thread, if necessary, before stopping it. Another solution is to make the refresh function synchronized (not sure if you can do that is JS but I know it's a thing in Java) so it's only done once at a time. However, this would make the shoutbox reload twice in a row again and again, or, in the worse-case scenario, continually reload without displaying the shoutbox. Because of this, the first solution is preferred.
I'm going to mark this as a duplicate, since the issue seems to be the way the Shoutboxes were being fully redrawn each time. Now that it's a little more DOM-friendly, I'm seeing rapid-loading on my Nintendo DSi.
One issue is likely due to the minute-long wait cycles for shoutbox reloads.
If I type a particularly long message, then the minute will coincide with me opening the textbox, which will lock control of the webpage. If I then press Enter (which I often do), then that along with the suspended reload will both try to reload the shoutbox at the same time, which will cause issues.
History
@HullBreach claimed ownership of this request.
26 Oct 2022 01:02
@HullBreach marked this request as a duplicate.
26 Oct 2022 01:02