Process locks app until finished?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Rugo

    Process locks app until finished?

    Hi All,
    I have an app the runs something, for instance copies a file. During this
    time my app is locked up. I have tried throwing a bunch of DoEvents in but
    nothing happens to allow me to work on other parts of the program. Is there
    something that can help here, or do I need to look at multi-threading?

    Thanks,
    John.


  • yEaH rIgHt

    #2
    Re: Process locks app until finished?


    Threads. Go for it.



    John Rugo wrote:
    [color=blue]
    > Hi All,
    > I have an app the runs something, for instance copies a file. During this
    > time my app is locked up. I have tried throwing a bunch of DoEvents in but
    > nothing happens to allow me to work on other parts of the program. Is there
    > something that can help here, or do I need to look at multi-threading?
    >
    > Thanks,
    > John.
    >
    >[/color]

    Comment

    • yEaH rIgHt

      #3
      Re: Process locks app until finished?


      Threads. Go for it.



      John Rugo wrote:
      [color=blue]
      > Hi All,
      > I have an app the runs something, for instance copies a file. During this
      > time my app is locked up. I have tried throwing a bunch of DoEvents in but
      > nothing happens to allow me to work on other parts of the program. Is there
      > something that can help here, or do I need to look at multi-threading?
      >
      > Thanks,
      > John.
      >
      >[/color]

      Comment

      • Brian Henry

        #4
        Re: Process locks app until finished?

        threading will fix this up for you.. create your process as a sub you want
        to run import the system.threadin g namespace and create a thread like this

        dim myThread as system.thread(a ddressof mySub)

        myThread.start( )

        thats just a generic example of it, MSDN can help you a lot more. Threading
        is a good thing to know with process intensive applications


        "John Rugo" <jrugo@patmedia .net> wrote in message
        news:eV6FduSGEH A.688@tk2msftng p13.phx.gbl...[color=blue]
        > Hi All,
        > I have an app the runs something, for instance copies a file. During this
        > time my app is locked up. I have tried throwing a bunch of DoEvents in[/color]
        but[color=blue]
        > nothing happens to allow me to work on other parts of the program. Is[/color]
        there[color=blue]
        > something that can help here, or do I need to look at multi-threading?
        >
        > Thanks,
        > John.
        >
        >[/color]


        Comment

        • Brian Henry

          #5
          Re: Process locks app until finished?

          threading will fix this up for you.. create your process as a sub you want
          to run import the system.threadin g namespace and create a thread like this

          dim myThread as system.thread(a ddressof mySub)

          myThread.start( )

          thats just a generic example of it, MSDN can help you a lot more. Threading
          is a good thing to know with process intensive applications


          "John Rugo" <jrugo@patmedia .net> wrote in message
          news:eV6FduSGEH A.688@tk2msftng p13.phx.gbl...[color=blue]
          > Hi All,
          > I have an app the runs something, for instance copies a file. During this
          > time my app is locked up. I have tried throwing a bunch of DoEvents in[/color]
          but[color=blue]
          > nothing happens to allow me to work on other parts of the program. Is[/color]
          there[color=blue]
          > something that can help here, or do I need to look at multi-threading?
          >
          > Thanks,
          > John.
          >
          >[/color]


          Comment

          • Cor

            #6
            Re: Process locks app until finished?

            Hi John,

            I add something to the other answers.

            Threading takes more overall processor time than not using threading. It can
            save total throughput time where there are detectable assynchronous
            processes.

            When the copying process is an assynchrone process, (your program is not
            dependable from the error free end of the copying process) than
            multithreading is in my opinon too the way to go.

            Copying is a single command process. And therefore when it is not the the
            situation above, than is in my opinon the solution to start a little splash
            screen something has (pseudo code)

            \\\
            frmsplsh as formsplash 'with wait etc
            frmsplsh.show
            'copy process
            frmsplsh.close
            frmsplsh.dispos e
            ///

            Just my thought

            Cor



            Comment

            • Cor

              #7
              Re: Process locks app until finished?

              Hi John,

              I add something to the other answers.

              Threading takes more overall processor time than not using threading. It can
              save total throughput time where there are detectable assynchronous
              processes.

              When the copying process is an assynchrone process, (your program is not
              dependable from the error free end of the copying process) than
              multithreading is in my opinon too the way to go.

              Copying is a single command process. And therefore when it is not the the
              situation above, than is in my opinon the solution to start a little splash
              screen something has (pseudo code)

              \\\
              frmsplsh as formsplash 'with wait etc
              frmsplsh.show
              'copy process
              frmsplsh.close
              frmsplsh.dispos e
              ///

              Just my thought

              Cor



              Comment

              • John Rugo

                #8
                Re: Process locks app until finished?

                Thanks for the help. I have tried using this and it seems to work well

                John.

                "Brian Henry" <brian.henry[nospam]@adelphia.net> wrote in message
                news:OP34ZxTGEH A.628@TK2MSFTNG P10.phx.gbl...
                threading will fix this up for you.. create your process as a sub you want
                to run import the system.threadin g namespace and create a thread like this

                dim myThread as system.thread(a ddressof mySub)

                myThread.start( )

                thats just a generic example of it, MSDN can help you a lot more. Threading
                is a good thing to know with process intensive applications


                "John Rugo" <jrugo@patmedia .net> wrote in message
                news:eV6FduSGEH A.688@tk2msftng p13.phx.gbl...[color=blue]
                > Hi All,
                > I have an app the runs something, for instance copies a file. During this
                > time my app is locked up. I have tried throwing a bunch of DoEvents in[/color]
                but[color=blue]
                > nothing happens to allow me to work on other parts of the program. Is[/color]
                there[color=blue]
                > something that can help here, or do I need to look at multi-threading?
                >
                > Thanks,
                > John.
                >
                >[/color]



                Comment

                • John Rugo

                  #9
                  Re: Process locks app until finished?

                  Thanks for the help. I have tried using this and it seems to work well

                  John.

                  "Brian Henry" <brian.henry[nospam]@adelphia.net> wrote in message
                  news:OP34ZxTGEH A.628@TK2MSFTNG P10.phx.gbl...
                  threading will fix this up for you.. create your process as a sub you want
                  to run import the system.threadin g namespace and create a thread like this

                  dim myThread as system.thread(a ddressof mySub)

                  myThread.start( )

                  thats just a generic example of it, MSDN can help you a lot more. Threading
                  is a good thing to know with process intensive applications


                  "John Rugo" <jrugo@patmedia .net> wrote in message
                  news:eV6FduSGEH A.688@tk2msftng p13.phx.gbl...[color=blue]
                  > Hi All,
                  > I have an app the runs something, for instance copies a file. During this
                  > time my app is locked up. I have tried throwing a bunch of DoEvents in[/color]
                  but[color=blue]
                  > nothing happens to allow me to work on other parts of the program. Is[/color]
                  there[color=blue]
                  > something that can help here, or do I need to look at multi-threading?
                  >
                  > Thanks,
                  > John.
                  >
                  >[/color]



                  Comment

                  Working...