SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Feb 2000
    Location
    Atlanta, GA, USA
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Are Silk Test functions thread safe?

    Hi all,

    I have a multithread programming question I am hoping someone can help me out with.

    I saw this following bit in Silk Test Help and it made me wonder:

    "In the SilkTest environment, a thread is a mechanism for interleaving the execution of blocks of client code assigned to different Agents so that one script can drive multiple client applications simultaneously. A thread is part of the script that starts it, not a separate script. Each thread has its own call stack and data stack. However, all the threads that a script spawns share access to the same global variables, function arguments, and data types. A file that one thread opens is accessible to any thread in that script."

    Can someone explain further what is meant by "... share access to the same global variables, function arguments, and data types."?

    I understand pretty well about global variables and thread safety. However I'm confused by the 'function arguments and data types' section of that statement.

    tia,

    -Steven

  2. #2
    Member
    Join Date
    Aug 2006
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Are Silk Test functions thread safe?

    Before I begin my explanation I would like you to make a note of "A file that one thread opens is accessible to any thread in that script."

    In the same context, if a thread is executing a function say ADD() which is setting some values to some of the arguments within that function then the other thread can invoke the same function ADD() at the same time and use the same arguments and set some different values to them.

    Bottom line is ... every thread makes a copy of the testcase and hence all the elements in a testcase remain unique to each and every thread.

    As it says "A file that one thread opens is accessible to any thread in that script." this means that jus bcoz the file is open by one thread doesnot mean that it will throw a SHARING VIOLATION for the other thread.

    If we use the analogy of JAVA, every thread is a seperate instance of that single testcase.

    "all the threads that a script spawns share access to the same global variables, function arguments, and data types"
    This is Borland's version of saying the same thing [img]/images/graemlins/smile.gif[/img]

    Cheers!!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:44 AM.

Copyright BetaSoft Inc.