waived

thread_for_duration.go

May 19th, 2024
7,445
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.30 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     "os"
  6.     "os/signal"
  7.     "syscall"
  8.     "sync"
  9.     "time"
  10. )
  11.  
  12. func worker(id int, wg *sync.WaitGroup, stopChan chan struct{}) {
  13.     defer wg.Done()
  14.     for {
  15.         select {
  16.         case <-stopChan:
  17.             fmt.Printf("Worker %d received stop signal. Exiting...\n", id)
  18.             return
  19.         default:
  20.             fmt.Printf("Worker %d is running\n", id)
  21.             time.Sleep(1 * time.Second)
  22.         }
  23.     }
  24. }
  25.  
  26. func main() {
  27.     fmt.Println("Press CTRL+C to exit")
  28.  
  29.     // Create a channel to listen for the interrupt signal
  30.     interrupt := make(chan os.Signal, 1)
  31.     signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)
  32.  
  33.     // Create a wait group to wait for all goroutines to finish
  34.     var wg sync.WaitGroup
  35.  
  36.     // Create a channel to signal stop to goroutines
  37.     stopChan := make(chan struct{})
  38.  
  39.     // Start 5 goroutines
  40.     for i := 0; i < 5; i++ {
  41.         wg.Add(1)
  42.         go worker(i, &wg, stopChan)
  43.     }
  44.  
  45.     // Wait for the interrupt signal
  46.     <-interrupt
  47.     fmt.Println("Interrupt signal received. Stopping workers...")
  48.  
  49.     // Signal stop to goroutines
  50.     close(stopChan)
  51.  
  52.     // Wait for all goroutines to finish before exiting
  53.     wg.Wait()
  54.     fmt.Println("All workers have exited. Exiting program.")
  55. }
Advertisement
Comments
  • Texpukar
    57 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Nikbenos
    50 days
    # CSS 0.06 KB | 0 0
    1. We just shared HQ data on our channel: https://t.me/theprotocolone
Add Comment
Please, Sign In to add comment