Two sessions simultaneously?

Here you can talk about anything related to BBC BASIC, not covered in another category
User avatar
5against4
Posts: 21
Joined: Tue 03 Apr 2018, 11:57
Location: The Cotswolds

Two sessions simultaneously?

Post by 5against4 »

Does anyone know if there are any negative repercussions of running two BB4W sessions at the same time? i don't do this often, but have noticed when i do that programs sometimes seem to run a little differently from normal.

It's not a big issue at all in terms of how i use BB4W - and the only reason i'm doing it right now is to ensure some code i'm transplanting from one place to another goes across correctly/smoothly - but it got me wondering about possible issues arising from running multiple BB4W sessions.
DDRM

Re: Two sessions simultaneously?

Post by DDRM »

Hi 5:4,

It should be fine to run two (or more) sessions in parallel. I often do, and have never noticed any problems, and I know Richard does it.

Best wishes,

D
p_m21987
Posts: 177
Joined: Mon 02 Apr 2018, 21:51

Re: Two sessions simultaneously?

Post by p_m21987 »

Hello,
i don't do this often, but have noticed when i do that programs sometimes seem to run a little differently from normal.
Just out of interest, I'd like to ask you - would you describe the differences you noticed?

I often run two or more instances of BBCSDL when I'm working on one of my projects. It's not a problem at all. I don't use BB4W often but I'm sure it shouldn't be a problem there either.

However, one thing you should be aware of is if you've written a program that uses temporary files. If the program always uses the same filenames for its temporary files, there could be a conflict if you run two instances of that program, with one instance overwriting the other's temporary data.

If you're writing programs that use temporary files, be sure to put some random characters in the file names, so that each instance of that program will have unique names for its temporary files. For example, something like this:

Code: Select all

temp_text_file_path$=@tmp$+"temptext_"+STR$(RND(100000))+"_"+STR$(RND(100000))+".txt"
PM
User avatar
5against4
Posts: 21
Joined: Tue 03 Apr 2018, 11:57
Location: The Cotswolds

Re: Two sessions simultaneously?

Post by 5against4 »

Patrick M wrote: Thu 12 Jul 2018, 19:59 Just out of interest, I'd like to ask you - would you describe the differences you noticed?
To be honest, i can't remember - it's been so long since i used two simultaneous sessions. But if/when it happens again, i'll be sure to post on here!