# test case for attempting simultaneous access to same file

package require Thread

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        after 10
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err2

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err3

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err4

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err5

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err6

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err7

catch {
    thread::create -preserved [subst -nocommands {
        # load the erlag i/f
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
        
        
        puts "thread exit"
        
        thread::release
    }]
} err8


      catch {
        package require stooop
        package require rrdtool
        package require ftpd
        package require csv
        package require ftp
        package require html
        package require math
    } terr

puts "err=$err terr=$terr"
vwait xxx

