Results 1 to 2 of 2

Thread: Threading A Nitemare

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    Threading A Nitemare

    Hey all

    here goes

    i have in my form a call to an object in my class i wish for this to execute in a new thread so

    on the fom something like
    VB Code:
    1. Dim t As New Thread(AddressOf objSpider.SpiderURL)
    2.             t.Name = "Spider Thread"
    3.             t.Start()

    this then calls a FUNCTION in my class

    Public Function Spider() As Boolean

    i wish to return a string from this class, therefore im using a function and just returning the string by RETURN BLAH
    however as soon as i start threading i get problems

    cant thread on a function so change to sub and then i cant return anything


    can anyone advise
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    You may want to create a class whose only purpose is to hold some data - update this with your threaded sub, then read from another thread.

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width