This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package go | |
import java.util.concurrent.{ArrayBlockingQueue => JArrayBlockingQueue, BlockingQueue => JBlockingQueue, TimeUnit} | |
object Channel { | |
def empty[A]: Channel[A] = new BlockingChannel() | |
def make[A]: Channel[A] = make(1) | |
def make[A](capacity: Int): Channel[A] = new BlockingChannel(capacity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.grasswire.grasswireurlshortener | |
import akka.actor.ActorSystem | |
import com.typesafe.config.ConfigFactory | |
import org.apache.commons.validator.routines.UrlValidator | |
import spray.http.StatusCodes | |
import spray.routing._ | |
import scala.util.Random | |
import scalaz.concurrent._ |